yogthos/markdown-clj — pull request #24 by ptaoussanis (2013-12-20 17:12:21+00:00)
Title: Add support for additional escape characters

Hi Dmitri,

Small change here to add support for the additional prescribed escape characters as per http://daringfireball.net/projects/markdown/syntax#backslash.

Unit tests passing.

Actually while it does get the job done, I think the current control character escaping is technically wrong. As currently implemented, (md-to-html-string "\\*") gives "

*

" where I believe the spec's intention is actually just to give "

*

". It's not a serious problem. I'm assuming you did this intentionally as an easy way of implementing the control character escaping?

One idea: maybe we could run the process back again after the markdown transforms to replace the &#; encoded forms with their original characters? That way you could keep the same [simple] implementation, if that was a goal. As I said, nothing urgent - just thinking out-loud.

Thanks a lot, cheers! :-)