Skip to content

markdown parser drops important information causing asymmetric read/write #22

Open
@timothypratley

Description

@timothypratley

Given an input markdown file, important information is lost

(def text (slurp "md/try-again.md"))
(def doc (md/parse text))
(def result (mdt/->text doc))
(spit "md/try-again2.md" result)

(deftest ttt
  (is (= result text)))
;=> fail
  1. HTML tagged sections are removed
  2. The original text is not preserved (only the content)

It would be useful to preserve the original text (for the same reasons clj-rewrite exists).

I'm trying to convert a Markdown file into a Clojure namespace by just putting comments around everything that is not code, and stripping the blocks around the code, but reproducing the Markdown is not straight forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions