atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Address multiple issues with comments and multiline tags #93

Closed 50Wliu closed 7 years ago

50Wliu commented 7 years ago

Requirements

Description of the Change

There are three issues addressed in this pull request.

  1. Comments would be ignored in all parts of a multiline block, including the tag definition itself. language-yaml now tokenizes comments following a tag definition.
  2. Multiline tag definitions would override the comment pattern, resulting in a comment receiving incorrect tag highlighting. The multiline tag definition regexes have been tweaked to match other similar regexes.
  3. Key-like structures in multiline blocks would be tokenized as actual key structures rather than a continuation of the string block. The end regex has been changed to better match the spec.

Alternate Designs

None.

Benefits

Comment + multiline tag interactions will be improved.

Possible Drawbacks

These regexes just got a whole lot uglier. I didn't even think that was possible.

Applicable Issues

Fixes #84 Fixes #92

Nixinova commented 3 years ago

This PR introduced errors with valid hash signs in key names like this:

TXT: text
C#: programming

See #114