atom-community / markdown-preview-plus

Markdown Preview + Community Features
https://atom.io/packages/markdown-preview-plus
Other
370 stars 84 forks source link

How to display the number of the code line in the code block #481

Closed ZHULOO closed 4 years ago

ZHULOO commented 4 years ago

When preview the gfm markdown, it show the code block with no line number, How to display the code line number? or How to set? Thanks?

lierdakil commented 4 years ago

With markdown-it, you don't. And GitHub doesn't do line numbers either, so...

If you're using pandoc (you also need to select it in MPP settings), then see the docs on fenced code blocks (TL;DR: add .numberLines class). Fair warning: this is non-standard Markdown, and will basically only work with pandoc (which might be fine for your use case, I don't know)

ZHULOO commented 4 years ago

Thanks,I will try the pandoc.