Highlight Bash/shell code in Markdown files

后端 未结 7 1979
猫巷女王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条回答
  •  梦毁少年i
    2021-01-29 17:55

    Per the documentation from GitHub regarding GFM syntax highlighted code blocks

    We use Linguist to perform language detection and syntax highlighting. You can find out which keywords are valid in the languages YAML file.

    Rendered on GitHub, console makes the lines after the console blue. bash, sh, or shell don't seem to "highlight" much ...and you can use posh for PowerShell or CMD.

提交回复
热议问题