pandocdocbook

Converting docbook xml file to md file using pandoc, seeing [_section_Id] next to headings in the converted md file, how to avoid that?


As the title briefly explains, I'm facing an issue while converting docbook xml files to md files, here is the command that I'm using pandoc -f docbook -t markdown_mmd -s /path/to/docbook/xml -o /path/to/md the md files get generated correctly but I see these ids which are actually ids of the section tags from the docbook xml file, added next to the headings, I do not wish those to be added in the md file, attaching the screenshots of the xml file and md file, any suggestions if I can use any pandoc options/arguments to avoid those? thanks docbook xml filegenerated md fileunrendered md file


Solution

  • The browser extension you're using to render and view the markdown just doesn't support the mmd_header_identifiers syntax.

    Use -t markdown_mmd-mmd_header_identifiers to turn that extension off.

    To see for which extensions the markdown_mmd variant is shorthand for, use:

    pandoc --list-extensions=markdown_mmd