* fix: null reference introduced in ab8c9e5988
* update
Signed-off-by: Innei <i@innei.in>
* fix: code block change theme flash
Signed-off-by: Innei <i@innei.in>
---------
Signed-off-by: Innei <i@innei.in>
Co-authored-by: Innei <i@innei.in>
This commit is contained in:
@@ -149,7 +149,7 @@ export const ShikiHighLighter: FC<ShikiProps> = (props) => {
|
||||
|
||||
if (!loaded) {
|
||||
return (
|
||||
<pre className={className}>
|
||||
<pre className={cn("bg-transparent", className)}>
|
||||
<code>{code}</code>
|
||||
</pre>
|
||||
)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
.shiki-wrapper {
|
||||
@apply rounded-md overflow-hidden;
|
||||
|
||||
pre {
|
||||
@apply bg-transparent;
|
||||
}
|
||||
|
||||
&.transparent {
|
||||
:global {
|
||||
.shiki,
|
||||
|
||||
@@ -164,6 +164,8 @@ export const parseHtml = (
|
||||
? propsChildren.find((i) => i.type === "code")
|
||||
: propsChildren
|
||||
|
||||
if (!children) return null
|
||||
|
||||
if (
|
||||
"type" in children &&
|
||||
children.type === "code" &&
|
||||
|
||||
@@ -215,7 +215,7 @@ export const EntryContentRender: Component<{
|
||||
noMedia={noMedia}
|
||||
accessory={contentAccessories}
|
||||
as="article"
|
||||
className="prose !max-w-full dark:prose-invert prose-h1:text-[1.6em]"
|
||||
className="prose !max-w-full dark:prose-invert prose-h1:text-[1.6em] prose-h1:font-bold"
|
||||
style={stableRenderStyle}
|
||||
renderInlineStyle={readerRenderInlineStyle}
|
||||
>
|
||||
@@ -315,7 +315,10 @@ const ReadabilityContent = ({ entryId }: { entryId: string }) => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<HTML as="article" className="prose dark:prose-invert prose-h1:text-[1.6em]">
|
||||
<HTML
|
||||
as="article"
|
||||
className="prose dark:prose-invert prose-h1:text-[1.6em] prose-h1:font-bold"
|
||||
>
|
||||
{result?.content ?? ""}
|
||||
</HTML>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user