Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ToC generation to gfm output #5172

Closed
ExplodingLemur opened this issue Dec 23, 2018 · 1 comment
Closed

Add ToC generation to gfm output #5172

ExplodingLemur opened this issue Dec 23, 2018 · 1 comment

Comments

@ExplodingLemur
Copy link

When converting from MS Word (docx) to Markdown using gfm as the output format, the --toc flag has no effect. When using markdown_github however it generates a table of contents from the section headings in the document.

Feature request: Add table-of-contents generation to the gfm output format.

Example of commands used:
pandoc Blah.docx -f docx -t gfm -s --toc --extract-media=Blah -o Blah.md No ToC generated
pandoc Blah.docx -f docx -t markdown_github -s --toc --extract-media=Blah -o Blah.md ToC is generated

@mb21
Copy link
Collaborator

mb21 commented Dec 23, 2018

Indeed, the template is correct, but the commonmark writer doesn't populate the $toc$ and $table-of-contents$ variables...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants