Table of Contents inconsistent behavior & syntax issues

Viewed 3

Hi there! I am currently doing a stress test of Marked 3, to see if it can satisfy my requirements to take the place of an export and review pipeline for my dark fantasy books, which are written in Obsidian CommonMark (GFM). At first look, the tool seems very capable but there are a number of issues, especially around the TOC, that I have found. Would be glad for your feedback. Bug report below:

Environment background: macOS Tahoe Version 26.5.2 (25F84), Marked Trial Version 3.1.18 (1201), Obsidian editor, file opened via Marked macOS app directly.

  • TOC in CommonMark processor NEVER works. Wether with the html comment marker or via the "Print table of contents" setting set to active, so TOC renders at the start of the document, it matters not.
  • TOC in MultiMarkdown processer MOSTLY works. HTML comment marker NEVER works, curly braces marker DOES work. When a document has both a marker AND "Print table of contents" active, TOC prints twice — both at the start of the document and in place of the marker. When turning of "Print table of contents", the TOC is correctly printed in place of the marker.
  • The curly braces syntax in MultiMarkdown with and without heading level limit i.e. {{TOC:2-6}} produces INCONSISTENT results. Without the level limiter, ALL headings from the ENTIRE document are rendered — no matter where the marker sits. With the level limiter, only the headings that come AFTER the toc marker, are rendered.
  • For TOC in general, the style settings applied in the export pane don't seem to be respected for TOC markers in the document.
  • Contrary to the documentation "The Table of Contents will display only once, even if there are multiple specifiers in the content.", I can add many TOC markers in the document and they are all rendered.
0 Answers