From 9e28fcd7389af41c720ceafc9468cfcabff132f2 Mon Sep 17 00:00:00 2001 From: Innei Date: Sun, 19 Oct 2025 20:33:28 +0800 Subject: [PATCH] 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 --- .../modules/entry-content/components/layouts/ArticleLayout.tsx | 2 +- apps/mobile/web-app/html-renderer/src/HTML.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx index 755f69d59..696dc59e3 100644 --- a/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx +++ b/apps/desktop/layer/renderer/src/modules/entry-content/components/layouts/ArticleLayout.tsx @@ -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} > diff --git a/apps/mobile/web-app/html-renderer/src/HTML.tsx b/apps/mobile/web-app/html-renderer/src/HTML.tsx index 104fe0ab3..d2a67b83c 100644 --- a/apps/mobile/web-app/html-renderer/src/HTML.tsx +++ b/apps/mobile/web-app/html-renderer/src/HTML.tsx @@ -66,7 +66,7 @@ export const HTML = (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, )}