github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.36k stars 4.27k forks source link

Wrong highlighting for minified css file #3058

Closed jcubic closed 8 years ago

jcubic commented 8 years ago

I have this minified file and the syntax highlighting is wrong, it display the whole thing as comment. I've tested the file in atom and it look correct.

jcubic commented 8 years ago

I've reported the issue here https://github.com/textmate/css.tmbundle/issues/26

arfon commented 8 years ago

I've reported the issue here textmate/css.tmbundle#26

Thanks for reporting this upstream @jcubic. When this is fixed in https://github.com/textmate/css.tmbundle/issues/26 we'll automatically update here.

jcubic commented 8 years ago

they said

There is nothing wrong with the grammar itself, the same code snippet parses in TextMate just fine. It appears that GitHub's parser has a time limit or length limit per-line before the parser cancels out and returns the line unparsed. So it's not actually matching as a comment it just never gets closed as that is on the line with the rest of the CSS.