
答案1
嘗試以下命令:
pandoc -f gfm --toc -s README.md -o r.md
因為它對我來說在最新版本的pandoc
.
使用 pandoc 自己的README.md
,我得到了這個目錄:
- [Pandoc](#pandoc)
- [The universal markup
converter](#the-universal-markup-converter)
- [Installing](#installing)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)