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

Address multiple issues with comments and multiline tags #93

merged 1 commit into from Sep 16, 2017


None yet
1 participant

50Wliu commented Sep 16, 2017


  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

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



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

@50Wliu 50Wliu merged commit c0860d9 into master Sep 16, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@50Wliu 50Wliu deleted the wl-comment-fixes branch Sep 16, 2017

@50Wliu 50Wliu referenced this pull request Sep 18, 2017

Closed in block scalar #94

1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment