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

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

@ikatyang
Copy link
Member

left a comment

❤️ Thank you very much!

@ikatyang ikatyang merged commit d86f39c into prettier:master Nov 14, 2018

7 of 8 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
ci/circleci: build_prod Your tests passed on CircleCI!
Details
ci/circleci: checkout_code Your tests passed on CircleCI!
Details
ci/circleci: test_prod_node4 Your tests passed on CircleCI!
Details
ci/circleci: test_prod_node9 Your tests passed on CircleCI!
Details
ci/circleci: test_prod_standalone Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@JLHwung JLHwung deleted the JLHwung:add-symbol-modifier-to-cjk-pattern branch Nov 15, 2018

@ikatyang ikatyang added this to the 1.15.3 milestone Nov 23, 2018

@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.
Projects
None yet
2 participants
You can’t perform that action at this time.