atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Make the grammar PCRE compatible #88

Closed pchaigno closed 7 years ago

pchaigno commented 7 years ago

Description of the Change

This pull request changes 2 regular expressions in an attempt to make the grammar PCRE-compatible. While Atom uses an Oniguruma engine, github.com (which rely on this grammar for YAML highlighting) uses a PCRE-based engine. The two engines interpret \h and \N differently.

Alternate Designs

None considered.

Benefits

Make the grammar PCRE-compatible. In particular, github.com uses a PCRE engine when it interprets this grammar. Example for the second change (escaping N): before and after.

Possible Drawbacks

I don't have any way to check these PCRE vs. Oniguruma discrepancies at the moment. I'm working on a new test at the Linguist-level to check for all known discrepancies.

References

This was first reported at github/linguist#3635 by @stof.