Highlight Bash/shell code in Markdown files

后端 未结 7 1984
猫巷女王i
猫巷女王i 2021-01-29 17:35

How can I highlight the Bash/shell commands in Markdown files?


For example, to highlight js, I write:



        
7条回答
  •  无人共我
    2021-01-29 17:45

    It depends on the Markdown rendering engine and the Markdown flavour. There is no standard for this. If you mean GitHub flavoured Markdown for example, shell should work fine. Aliases are sh, bash or zsh. You can find the list of available syntax lexers here.

提交回复
热议问题