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

feat: rewrite to meet w3c typography #68

Merged
merged 7 commits into from Mar 22, 2018
Merged

Conversation

ikatyang
Copy link
Owner

Fixes #48
Closes #47

@JLHwung

Sorry for the delay, I somehow missed this issue. And I'm not too familiar with unicode, would you be able to review this PR?

src/index.ts Outdated
const punctuation_charset = unicode({
const cjk_letters = unicode({
Script: ['Han', 'Katakana', 'Hiragana', 'Hangul', 'Bopomofo'],
General_Category: ['Other_Letter', 'Letter_Number', 'Other_Symbol'],
Copy link
Contributor

@JLHwung JLHwung Mar 21, 2018

Choose a reason for hiding this comment

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

The Modifier_Letter should be included such as <U+3005> 々

Repository owner deleted a comment from codecov-io Mar 21, 2018
Repository owner deleted a comment from codecov-io Mar 21, 2018
Repository owner deleted a comment from codecov-io Mar 21, 2018
@codecov-io
Copy link

codecov-io commented Mar 21, 2018

Codecov Report

Merging #68 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #68   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines           9      9           
=====================================
  Hits            9      9
Impacted Files Coverage Δ
src/index.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04cb2a3...53e2937. Read the comment docs.

@JLHwung
Copy link
Contributor

JLHwung commented Mar 21, 2018

LGTM.

The PR should be sufficient for the context of cjk-regex, however, I find the CSS Text Level 4 Draft adds text-spacing: ideograph-alpha (link), which tries to insert 1/4em space to ideographs and non-ideographs letters.

While prettier uses cjk-regex to achieve similar goals, the ideographs used in the css-text-4 and CJK Letter used in our library does not share same definition. Besides, the Unicode code points of Ideographs defined in css-text-4 is problematic and needs further review.

I think we should wait for the graduation of css-text-level 4 and the standard alignment should be done on the side of prettier. There is not much thing we can do on cjk-regex.

Edits: As for this PR, it is good to merge.

@ikatyang ikatyang merged commit d1ca3f6 into master Mar 22, 2018
@ikatyang ikatyang deleted the feat/w3c-typography branch March 22, 2018 16:07
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.

None yet

3 participants