rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Delete buggy detection for Mosel #1936

Closed CyrilBrulebois closed 1 year ago

CyrilBrulebois commented 1 year ago

The “Lexer Development” doc says:

It is important to note that self.detect? should only return true if it is
100% sure that the language is detected.

The specified function matches any file containing the words “model” or “package” at the beginning of a line, which misfires quite a lot!

Regularly spotted with debian/changelog files on https://salsa.debian.org/ (powered by GitLab).


In passing, http://rouge.jneen.net/ (mentioned in the About section) is unreachable.

jneen commented 1 year ago

Very good catch, thank you!

tancnle commented 1 year ago

Thanks for the contribution @CyrilBrulebois. LGTM 🚀