Skip to content

Conversation

faultyserver
Copy link
Contributor

Chinese and Japanese content usually do not include spaces between formatted and unformatted segments of a single phrase, such as **{value}**件の投稿. But this is technically not valid strong formatting according to the CommonMark spec, since the right flank of the ending delimiter is a non-space Unicode character.

See more information in the CommonMark discussion here:
https://talk.commonmark.org/t/emphasis-and-east-asian-text/2491/5
commonmark/cmark#208

Because this library is explicitly intended to support many languages including most Asian languages, we are adding an extension to the Markdown rules to accommodate these situations. The following tests assert that the special cases for East Asian languages function in a logically-similar way to Western languages.

The tests for this change are pretty small, as I'm not fluent in anything near CJK and have purely gone off of suggestions and forums to enumerate these. Most importantly, **{value}**件の投稿, is now treated as a bold value followed by plain text, rather than being completely ignored.

@faultyserver faultyserver merged commit 1e4f0ba into main Dec 19, 2024
@faultyserver faultyserver deleted the cjk-punctuation branch December 19, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant