Closed wesinator closed 6 years ago
This is going to be due to the grammar using a quantifier regexp that is not valid PCRE (as used by GitHub) and but is a valid Oniguruma Regular Expression (as used by Atom).
The incompatibility is in the use of {,2}
(and similar usage elsewhere) in the grammar in the regex at https://github.com/blacktop/language-yara/blob/1093d3d528dce6b3c8362dfedfce978cf9979b1e/grammars/yara.cson#L78, specifically {,2}
isn't valid PCRE (see quantifiers at https://perldoc.perl.org/perlreref.html#QUANTIFIERS) and needs to be {0,2}
. Oniguruma however allows this usage hence it works in Atom.
So as with almost all highlighting issues, this is a problem with the grammar. Please log an issue with the grammar.
Closing as this is not a problem with Linguist.
I've sent a pull request (cf. blacktop/language-yara#4) to fix it.
Preliminary Steps
Please confirm you have...
Problem Description
YARA language highlighting on Github unexpectedly highlights certain sequences (
\x
) in red as if it interprets as an error. Not reproducible with the same grammar version in atom:URL of the affected repository: https://github.com/viper-framework/yara-rules/blob/6a8a376542320c0c58ba15cd027653c76e05af4e/leverage.yar#L15
Expected:
\x
is not red