yogthos / markdown-clj

Markdown parser in Clojure
Eclipse Public License 1.0
540 stars 120 forks source link

Metadata Parsing in ClojureScript #168

Closed neilyio closed 3 years ago

neilyio commented 3 years ago

Metadata parsing doesn't seem to work for me at all in ClojureScript on NodeJS and markdown-clj 1.10.5:

(require '[markdown.core :as m])

(def markdown "# This is a test\nsome code follows\n```clojure\n(defn foo [])\n```")

(m/md->html markdown)
;; => "<h1>This is a test</h1><p>some code follows<pre><code class=\"clojure\">&#40;defn foo &#91;&#93;&#41;\n</code></pre></p>"

(m/md->html-with-meta markdown)
;; => {:metadata nil, :html ""}

I didn't see anything in the README that suggested that metadata can't be parsed in ClojureScript, and it's odd that the function is available and simple returns empty data.

Am I doing something wrong, or is this unimplemented?

neilyio commented 3 years ago

Nevermind, I misunderstood what the metadata was supposed to be parsing. Sorry for the false alarm.