yogthos / markdown-clj

Markdown parser in Clojure
Eclipse Public License 1.0
544 stars 121 forks source link

Double hyphen converted to `–` in link target #204

Open jmglov opened 3 weeks ago

jmglov commented 3 weeks ago

This may be related to #146.

I added this test to md_test.cljc:

(deftest link
  (is (= "<p><a href='http://github.com/some--stuff.html'>github</a></p>"
         (entry-function "[github](http://github.com/some--stuff.html)"))))

Running the tests yields:

: markdown-clj; bb test:bb
Running tests in #{"test"}
Testing markdown.md-file-test
Testing markdown.md-test

FAIL in (link) (/home/jmglov/Documents/code/clojure/markdown-clj/test/markdown/md_test.cljc:237)
expected: (= "<p><a href='http://github.com/some--stuff.html'>github</a></p>" (entry-function "[github](http://github.com/some--stuff.html)"))
  actual: (not (= "<p><a href='http://github.com/some--stuff.html'>github</a></p>" "<p><a href='http://github.com/some&ndash;stuff.html'>github</a></p>"))

Ran 85 tests containing 153 assertions.
1 failures, 0 errors.

I'll clone the repo and try to fix it. :slightly_smiling_face:

yogthos commented 3 weeks ago

Awesome, a PR would be very welcome!