Skip to content

CJK Line Breaks #587

Description

@fangyi-zhou

Description

Input:

一
二
三
四
五

Expected Output:

<p>一二三四五</p>

Actual Output:

<p>一
二
三
四
五</p>

Why is this an issue?

We usually don't have spaces in CJK characters (Chinese, Japanese, Korean characters), unlike English and a bunch of other languages. If line breaks are preserved, it will render as a space in HTML, which is unnatural.
See also:
https://github.com/zhangkaizhao/asciidoctor_cjk_breaks
https://github.com/markdown-it/markdown-it-cjk-breaks
jgm/pandoc#2586
https://github.com/zbinlin/markdown-it-perfect-newline-for-cjk

If anyone would like to give some pointers to code changes, I can submit a PR

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions