-
Notifications
You must be signed in to change notification settings - Fork 16
feat(space-between-half-and-full-width): add an option to ignore numbers and apply only to alphabets #45
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
Merged
azu
merged 16 commits into
textlint-ja:master
from
Sean0628:feature/add_ignore_numbers_option
Jan 23, 2023
Merged
feat(space-between-half-and-full-width): add an option to ignore numbers and apply only to alphabets #45
azu
merged 16 commits into
textlint-ja:master
from
Sean0628:feature/add_ignore_numbers_option
Jan 23, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azu
reviewed
Jan 17, 2023
packages/textlint-rule-ja-space-between-half-and-full-width/README.md
Outdated
Show resolved
Hide resolved
…pace option in the new format
options - allow to pass space options as an array - e.g. ['alphabets', 'numbers', 'punctuation'] Refs: textlint-ja#45 (comment)
…ion to Object - avoid redundant accesses to arrays to reduce their complexity. O(n) -> O(1)
apply json format
azu
reviewed
Jan 22, 2023
packages/textlint-rule-ja-space-between-half-and-full-width/src/index.js
Outdated
Show resolved
Hide resolved
packages/textlint-rule-ja-space-between-half-and-full-width/src/index.js
Outdated
Show resolved
Hide resolved
packages/textlint-rule-ja-space-between-half-and-full-width/src/index.js
Outdated
Show resolved
Hide resolved
azu
reviewed
Jan 22, 2023
packages/textlint-rule-ja-space-between-half-and-full-width/README.md
Outdated
Show resolved
Hide resolved
azu
reviewed
Jan 22, 2023
packages/textlint-rule-ja-space-between-half-and-full-width/README.md
Outdated
Show resolved
Hide resolved
update README.md - modify the description about exceptPunctuation option
refactor parseSpaceOption - rename variables - assign userOptions with Object.fromEntries
use early returns
azu
approved these changes
Jan 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
ありがとうございます
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR tries to add an option to ignore numbers and apply only to alphabets.
Refs #40
変更点
space
オプションにスペースを入れる対象の配列を指定できるように"space": ["alphabets", "numbers", "punctuation"]
でアルファベット、数値、句読点の前後にスペースを入れる("space": "always"
と同じ意味)"space": ["alphabets", "punctuation"]
とすると アルファベットと句読点の前後にスペースを入れる"space": []
で全てにスペースを入れない("space": "never"
と同じ意味)exceptPunctuation
オプションは"space": ["alphabets", "numbers"]
で代用できるため、非推奨となりましたTEST
## テスト 2022年7月7日、本日は晴天なり。 りんごは英語でAppleという。