github-linguist / linguist

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

M (MUMPS) syntax highlighting doesn't work in Markdown #1468

Closed daugeldauge closed 10 years ago

daugeldauge commented 10 years ago

This is the test repo: https://github.com/daugeldauge/mtest As your see, MUMPS syntax highlighting works fine in the source file. But it doesn't work in README.md. Neither with M keyword nor with mumps.

daugeldauge commented 10 years ago

Or is it markdown engine issue? I'm not sure.

pchaigno commented 10 years ago

The lexer for M is the same as for Common Lisp. So if you use lisp as keyword it will work:

set cna = ##class(CNA.CNA).%New("путь к libcna") ; Создаем объект класса CNA.CNA. В аргументах указываем путь к libcna.dll или libcna.so
do  cna.LoadLibrary("путь к libtest")            ; Загружаем библиотеку libtest в CNA

@arfon If we add ace_mode: m to the M entry in languages.yml will it fix this problem? (I've never really understood what is the ace_mode entry...)

arfon commented 10 years ago

@pchaigno I'm pretty sure the ace_mode is just used on Gist although I'm not entirely sure where :confused:

bkeepers commented 10 years ago

ace_mode is used for the ace editor on gist (but not on github.com yet). /cc @gjtorikian

This wouldn't have any effect on the markdown rendering. I'm not really sure why it's not working properly in markdown. :(

pchaigno commented 10 years ago

I imagine that Linguist uses the alias for the lexers from Pygments as the source for the keywords to use in the mardown rendering. Since M doesn't have a lexer it doesn't work. We would need to explicitly define somewhere m and mumps as keywords for the mardown rendering.

pchaigno commented 10 years ago

We would need to explicitly define somewhere m and mumps as keywords for the mardown rendering.

@bkeepers I think it's an issue for the GitHub repository which renders Markdown documents. Would it be possible to open it there and close this one?

bkeepers commented 10 years ago

This is actually an issue with the SyntaxHighlightFilter in html-pipeline, which does not use linguist to determine which lexer to use.

pchaigno commented 10 years ago

I opened two issues at jch/html-pipeline to solve this: jch/html-pipeline#152 and jch/html-pipeline#153.