Highlight Bash/shell code in Markdown files

后端 未结 7 1974
猫巷女王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 18:05

    If you are looking to highlight a shell session command sequence as it looks to the user (with prompts, not just as contents of a hypothetical script file), then the right identifier to use at the moment is console:

    ```console
    foo@bar:~$ whoami
    foo
    ```
    

    0 讨论(0)
提交回复
热议问题