nextjournal / markdown

A cross-platform clojure/script parser for Markdown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block Formulas mess up the Table of Contents

zampino opened this issue · comments

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]}]}