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 string formatter for unexpected truncation on non-ASCII characters #6861

Merged
merged 3 commits into from May 25, 2023

Conversation

Max10240
Copy link
Contributor

@Max10240 Max10240 commented May 24, 2023

Which issue, if any, is this issue related to?

See issus: stringFormatter.js truncate non-ASCII characters unexpectedly

Closes #6860

Is there anything in the PR that needs further explanation?

The reason that why don't I just contribute code to repository table, is: make it to support full ability about non-ASCII seems like a lot of work. before it, we can solve the problem in this way first。

@changeset-bot
Copy link

changeset-bot bot commented May 24, 2023

🦋 Changeset detected

Latest commit: 7a01eae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ybiquitous
Copy link
Member

This may be the same problem as gajus/table#180

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request. There seem to be no big problems. 👍🏼
Please consider addressing my refactoring suggestions.

lib/formatters/stringFormatter.js Outdated Show resolved Hide resolved
lib/formatters/stringFormatter.js Outdated Show resolved Hide resolved
@ybiquitous ybiquitous changed the title Fix stringFormatter unexpected truncation on non-ascii characters Fix string formatter for unexpected truncation on non-ascii characters May 24, 2023
@ybiquitous ybiquitous changed the title Fix string formatter for unexpected truncation on non-ascii characters Fix string formatter for unexpected truncation on non-ASCII characters May 24, 2023
@Max10240
Copy link
Contributor Author

Thanks for the pull request. There seem to be no big problems. 👍🏼
Please consider addressing my refactoring suggestions.

OK, thanks for your review,i will refactor it soon~

…aracter class escape` & cache `getMessageWidth` result
@Max10240 Max10240 requested a review from ybiquitous May 25, 2023 00:56
Copy link
Member

@ybiquitous ybiquitous 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. LGTM 👍🏼

@ybiquitous ybiquitous merged commit 40b4a6d into stylelint:main May 25, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

stringFormatter.js truncate non-ASCII characters unexpectedly
2 participants