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

[YAML] Don't match controversial plain bools in keys #2566

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

FichteFoll
Copy link
Collaborator

YAML 1.1 made the prominent mistake of accepting many aliases for boolean values that many parsers adopted. For 1.2, these aliases have been removed, but for accuracy with the older version and especially
considering how older parsers are still seeing use, we cannot simply remove matching them.

However, the short names "y" and "on" are fairly common in keys and having those highlighted as a boolean is annoying, so we only match for the 1.2 scalars in keys.

I believe this solution to be a satisfactory compromise for #1602, where this issue has been discussed at length.

Closes #1602.

YAML 1.1 made the prominent mistake of accepting many aliases for
boolean values that many parsers adopted. For 1.2, these aliases have
been removed, but for accuracy with the older version and especially
considering how older parsers are still seeing use, we cannot simply
remove matching them.

However, the short names "y" and "on" are fairly common in keys and
having those highlighted as a boolean is annoying, so we only match for
the 1.2 scalars in keys.
@wbond wbond merged commit 29f229c into sublimehq:master Nov 12, 2020
@wbond
Copy link
Member

wbond commented Nov 12, 2020

Seems like a reasonable resolution, thanks @FichteFoll!

@FichteFoll FichteFoll deleted the pr/yaml/boolean-keys branch November 13, 2020 00:42
deathaxe added a commit to deathaxe/PackageDev that referenced this pull request Nov 20, 2020
FichteFoll pushed a commit to SublimeText/PackageDev that referenced this pull request Nov 28, 2020
mitranim pushed a commit to mitranim/Packages that referenced this pull request Mar 25, 2022
YAML 1.1 made the prominent mistake of accepting many aliases for
boolean values that many parsers adopted. For 1.2, these aliases have
been removed, but for accuracy with the older version and especially
considering how older parsers are still seeing use, we cannot simply
remove matching them.

However, the short names "y" and "on" are fairly common in keys and
having those highlighted as a boolean is annoying, so we only match for
the 1.2 scalars in keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YAML highlighting issue
4 participants