Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(markdown): add more category to CJK regex #5480

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 14, 2018

The following characters should be treated as CJK character

3099..309A    ; Hira Kana # Mn   [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
309B..309C    ; Hira Kana # Sk   [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK

Here is the playground link to show that current prettier adds redundant whitespaces around the characters.

The testcase text are copied from 半濁点 - Wikipedia and ヴ - Wikipedia respectively.

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.

For line-breaks the jlreq has specified a long lists of unbreakable situation. IMO it is more of the render process then a code formatter can take care of. Other than redundant whitespaces that can alter the content display, incorrect line breaks are less harmful as they do not impact the rendering of markdown documents.

Try the playground for this PR

Copy link
Member

@ikatyang ikatyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ Thank you very much!

@ikatyang ikatyang merged commit d86f39c into prettier:master Nov 14, 2018
@JLHwung JLHwung deleted the add-symbol-modifier-to-cjk-pattern branch November 15, 2018 02:23
@ikatyang ikatyang added this to the 1.15.3 milestone Nov 23, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants