feat: Line-height adjustments for Chinese, Japanese and Korean documents (#13822)

This commit is contained in:
Tlntin authored and GitHub committed 2026-09-22 03:18:17 +00:00
1 parent ce33ca5b5f
commit 488bbb7461
3 files changed
+19

No files matched your search

+15
View File
@@ -523,6 +523,21 @@ const textStyle = () => css`
margin-bottom: 0.8em;
}
}
/* East Asian scripts */
:lang(zh), /* Chinese */
:lang(ja), /* Japanese */
:lang(ko) {
/* Korean */
p {
line-height: 1.8;
}
.ProseMirror > p {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
}
`;
const style = (props: Props) => css`
+1
View File
@@ -37,6 +37,7 @@ describe("getSupportedLanguage", () => {
describe("getLangFor", () => {
it("returns languages that need special text styling", () => {
expect(getLangFor("fa")).toEqual("fa");
expect(getLangFor("zh")).toEqual("zh");
});
it("ignores other or empty languages", () => {
+3
View File
@@ -91,6 +91,9 @@ const scriptsWithLang = new Set([
"he", // Hebrew
"am", // Amharic
"mn", // Mongolian
"zh", // Chinese
"ja", // Japanese
"ko", // Korean
]);
/**