如何在 Markdown 文件中突出显示 Bash/shell 命令?
例如,为了突出js
,我写:
```js
function () { return "This code is highlighted as Javascript!"}
```
为了突出显示 HTML 代码,我使用 ```html
。
我们如何突出显示 Bash/shell 命令?
最佳答案
如果您希望在用户看来突出显示 shell session 命令序列(带有提示,而不仅仅是假设脚本文件的内容),那么此时使用的正确标识符是 console:
```console
foo@bar:~$ whoami
foo
```
关于bash - 如何在 Markdown 中突出显示 bash/shell 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20303826/