atom / language-gfm

GitHub Flavored Markdown in Atom
MIT License
101 stars 107 forks source link

Makefile Box in Markdown not highlighted #170

Open NicoHood opened 8 years ago

NicoHood commented 8 years ago

Came from here: https://github.com/atom/atom/issues/12915

If you have a markdown file (.md) with this content:

```makefile
# Compiler flag, 4M flash chip, SS on PB7 (original MP)
C_FLAGS += -DFLASH_CHIP_4M
C_FLAGS += -DFLASH_BIT_SS=PB7 -DFLASH_PORT_SS=PORTB -DFLASH_DDR_SS=DDRB
```.

The content is not highlighted, its just green. For example a cpp instead of makefile highlights the code inside the editor. If you press ctrl + m the markdown preview is shown, where the code is highlighted. This means markdown is actually supported but for some reason not highlighted in the markdown editor.

Using atom 1.10.2 on archlinux.

fasiha commented 7 years ago

Same for matlab and octave languages: contents of fenced code blocks are just green (as if no language was specified), and furthermore, language-mode-specific things like auto-indentation don’t work.

Most languages I’ve tried (js and haskell and rust) work just fine though.

Atom 1.12.7 on macOS Sierra.

fasiha commented 7 years ago

Looks like the gfm grammar hardcodes for a large number of languages, e.g., for CoffeeScript, JavaScript, and TypeScript see:

https://github.com/atom/language-gfm/blob/727bcc84ac077d9f5e633a7d31807e5116a2a65b/grammars/gfm.cson#L278-L328

Ideally such a list would be populated by a Markdown specification (haha), or possibly an Atom-wide grammar listing, but in the meantime, would the maintainers be ok with pull requests adding Makefile, Matlab, Octave, etc.?