github-linguist / linguist

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

Haml syntax highlighting got worse #3371

Closed meganemura closed 7 years ago

meganemura commented 7 years ago

I noticed that the haml syntax highlighting got worse, since #3355 merged linguist (v4.8.18) was applied to GitHub. I don't know why lightshow output is different to GitHub syntax highlighting. This affects many people using haml, so please consider reverting #3355 for workaround. I'm so sorry about this.

Please compare the lightshow ouput and the next haml.

/ HAML comment
- # ruby comment
string
= "string"
= "string" #comment
= "string #{not_comment}" # comment

-# 
  multi line comment
  multi line comment
  multi line comment
pchaigno commented 7 years ago

I don't know why lightshow output is different to GitHub syntax highlighting.

@aroben Any idea how that could happen?

Alhadis commented 7 years ago

I'm wondering if this could be related to #3130. The new grammar makes use of the $\n? trick for skipping newline boundaries, which I learned has portability issues between different TextMate implementations/regex engines.

lildude commented 7 years ago

I don't know why lightshow output is different to GitHub syntax highlighting.

It's because it's a different application that hasn't been updated inline with the Linguist updates as they're applied to GitHub.com. I'll update this :soon:

Alhadis commented 7 years ago

If you blokes could open-source it too so I can fix all its bugs, that'd be most copacetic. ;)

meganemura commented 7 years ago

Thanks @vmg. Close this issue in favor of #3627.