nextjournal / markdown

A cross-platform clojure/script parser for Markdown
ISC License
38 stars 4 forks source link

Block Formulas mess up the Table of Contents #19

Closed zampino closed 7 months ago

zampino commented 7 months ago

All headings after a block formula are just ignored in the toc. Reproduces with

(-> (parse "# Title
some par

$$p(z\\\\mid x) = \\\\frac{p(x\\\\mid z)p(z)}{p(x)}.$$

## SubTitle
") :toc)
;; => 

{:type :toc,
 :children [{:type :toc,
             :content [{:type :text, :text "Title"}],
             :heading-level 1,
             :attrs {:id "title"},
             :path [:content 0]}]}