atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Tokenize keys after an unquoted block #100

Closed winstliu closed 6 years ago

winstliu commented 6 years ago

Requirements

Description of the Change

Tokenize keys at the same level of indentation after an unquoted block section. The diff looks busy, but really all I did was flip the two block patterns so that the one matching dashes has precedence. There's also a minor optimization to tag name matching where it will now stop upon reaching a colon rather than EOL.

Alternate Designs

None.

Benefits

Another YAML bug squashed.

Possible Drawbacks

Hopefully none - I feel like this makes a ton more sense than trying to keep the previous order where for some reason the less-specific non-dash version was matched before the more-specific dash version.

Applicable Issues

Fixes #78