-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Table formatting for full width characters #53
Conversation
0f213fc
to
f894abb
Compare
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.
This solution isn't perfect. There will be other cases where the table is visually misaligned, probably with flag emojis and such. But as a work around for the what is probably the most common problem I do think this is acceptable.
That said, as this problem is common to both implementations, please do add an example in the testdata
folder.
Just noticed the Java implementation doesn't test against the |
My present understanding is that testdata only validates that: parsing - before and after formatting - yields the same messages representation - excluding the formatting itself. To check: modify the formatting of a testdata feature file, and run Thus, surplus to existing feature files, adding my example would only really test that CJK characters can be parsed and are not removed by formatting; not the formatting itself - not sure whether that is valuable? The fix is trivial: adding Interested to get your perspective on best way forward - and whether should be completed as separate issue:
|
🤔 What's changed?
Count full-width characters as 2 spaces to determine table column width for formatting; with half-width characters counted as 1 space, as per existing implementation.
Implementation aligns with vscode-markdown and Cucumber Autocomplete extension.
⚡️ What's your motivation?
Fixes cucumber/vscode#99.
Present formatted example:
Amended formatted example
Formatted example using a full-width character supported font
With the aforementioned 'amended formatted example' and the Iosevka font, it appears as follows in the browser...
...and as follows in VSCode:
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Whether should be classed as a 'bug' or an 'enhancement'.
📋 Checklist: