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

match uppercase non-english letters too #45

Merged
merged 2 commits into from
Nov 25, 2023
Merged

Conversation

Thyrst
Copy link
Contributor

@Thyrst Thyrst commented Nov 5, 2023

#44

Copy link

netlify bot commented Nov 5, 2023

Deploy Preview for sentence-splitter ready!

Name Link
🔨 Latest commit 6f8c858
🔍 Latest deploy log https://app.netlify.com/sites/sentence-splitter/deploys/654e1d8c6c6e9000096f6b68
😎 Deploy Preview https://deploy-preview-45--sentence-splitter.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@azu azu left a comment

Choose a reason for hiding this comment

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

@@ -7,7 +7,7 @@ const isCapitalized = (text: string) => {
if (!text || text.length === 0) {
return false;
}
return /^[A-Z]/.test(text);
return /^\p{Lu}/u.test(text);
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use /^\p{Uppercase_Letter}/ because I needed to find out what Lu meant.

https://www.regular-expressions.info/unicode.html#category

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@azu azu added the Type: Feature New Feature label Nov 6, 2023
@Thyrst Thyrst requested a review from azu November 23, 2023 13:08
Copy link
Member

@azu azu left a comment

Choose a reason for hiding this comment

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

Thanks.

@azu azu merged commit 622114f into textlint-rule:master Nov 25, 2023
6 checks passed
@azu
Copy link
Member

azu commented Nov 25, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants