29

Related to Implement ```-style (fenced) Markdown code blocks

  1. On this answer I used ```makefile and it is "working" the highlighting:
    • enter image description here
  2. However, on this other answer, I am also using ```makefile and it is not working the highlighting:
    • enter image description here

Where is the list of language names supported by the markdown fenced code blocks? Is makefile one of them? Perhaps it is called Makefile? makemake? toktok?

The documentation on https://stackoverflow.com/editing-help#syntax-highlighting does not say it either.

1
  • Neither is working for me.
    – Laurel
    Commented Oct 13, 2019 at 6:06

1 Answer 1

16

The list is maintained in the official FAQ:

What is syntax highlighting and how does it work?

Do note that makefile is not in this list. The reason you see some effect is caused by the fallback that is used for unknown prettifiers: It uses default and that effectively means it take a guess, does a best effort. See also my answer on Meta.SO: What is the default language for the syntax highlighter?

I advice you to first use a supported highligther and go from there.

4
  • What is the diff between extension and core? E.g. Ruby has ext. rb, but is in core. Commented Dec 19, 2020 at 10:20
  • 1
    @user3123159 thanks, I have removed that obsolete list. Please visit the actual maintained list in the FAQ post: meta.stackexchange.com/questions/184108/…
    – rene
    Commented Dec 19, 2020 at 10:30
  • On the SE sites, the language is autodetected by tags according to your link (no need for the language name after three backticks). Whereas on Github, you have to name the language after the three backticks, this is the official md style (```markdown). Commented Dec 20, 2020 at 7:51
  • 1
    @user3123159 not all tags have a highlighter hint and some tags have notoriously weird default selections.
    – rene
    Commented Dec 20, 2020 at 11:41

Not the answer you're looking for? Browse other questions tagged .