Skip to content

Commit

Permalink
Update chinese-remove-space.md
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 authored Feb 20, 2025
1 parent 16c7bad commit c5a134e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/FAQ/chinese-remove-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ tags: [layout, text]
0.12 可以玩 `regex` 魔法了,`regex` 现在可以跨不同的 `text`

```typst
测试一下,效果怎么样。(✓)
测试一下,效果怎么样。
测试一下,
效果怎么样。(✗)
效果怎么样。
// https://www.w3.org/TR/clreq/#table_of_punctuation_marks
#let han-or-punct = "[-\p{sc=Hani}。.,、:;!‼?⁇⸺——……⋯⋯~–—·・‧//「」『』“”‘’()《》〈〉【】〖〗〔〕[]{}_﹏●•]"
Expand All @@ -20,7 +20,7 @@ tags: [layout, text]
}
测试一下,
效果怎么样。(✓)
效果怎么样。
```

::: details 微小副作用
Expand All @@ -31,18 +31,18 @@ tags: [layout, text]
#set page(width: auto, height: auto, margin: 1em)
#set text(font: ((name: "New Computer Modern", covers: "latin-in-cjk"), "Source Han Serif SC"))
“七斤嫂,你‘恨棒打人’。……”(✓)
“七斤嫂,你‘恨棒打人’。……”
“七斤嫂,你‘恨棒打人’。(✗)
……”
“七斤嫂,你‘恨棒打人’。
……”
#show regex("[。] [……]"): it => {
let (a, _, b) = it.text.clusters()
a + b
}
“七斤嫂,你‘恨棒打人’。(✗)
……”
“七斤嫂,你‘恨棒打人’。
……”
```

相关 issue:[Ignore linebreaks between CJK characters in source code · #792](https://github.com/typst/typst/issues/792)
Expand Down

0 comments on commit c5a134e

Please sign in to comment.