fix: update text autospace in ArticleLayout and HTML components

- Added `[text-autospace:auto]` class to the `className` property in both ArticleLayout and HTML components to enhance text rendering and improve readability.
- This change ensures better handling of text spacing across different content types.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-10-19 20:33:28 +08:00
parent 06321af9e8
commit 9e28fcd738
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ const Renderer: React.FC<{
noMedia={noMedia}
accessory={contentAccessories}
as="article"
className="prose dark:prose-invert prose-h1:text-[1.6em] prose-h1:font-bold !max-w-full hyphens-auto"
className="prose dark:prose-invert prose-h1:text-[1.6em] prose-h1:font-bold !max-w-full hyphens-auto [text-autospace:auto]"
style={stableRenderStyle}
renderInlineStyle={readerRenderInlineStyle}
>

View File

@ -66,7 +66,7 @@ export const HTML = <A extends keyof React.JSX.IntrinsicElements = "div">(props:
{
...rest,
ref: setRefElement,
className: clsx("prose mx-auto px-5 pb-8", "dark:prose-invert"),
className: clsx("prose mx-auto px-5 pb-8 [text-autospace:auto]", "dark:prose-invert"),
},
markdownElement,
)}