diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-06-21 12:18:27 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-06-21 12:18:27 +0200 |
commit | a1189f110940663ab7f1fe7e28459d53a71386a6 (patch) | |
tree | 7933dfc6fbf41ce9b4e6fa1fef9923f7de9383a4 | |
parent | 6dfdba0d9a21335faf3fc665646afb4402f1f812 (diff) |
Book Marx: Don't process bookmark descriptions using our own HTML transformer. Use Pegdown instead.
-rw-r--r-- | src/mulk/benki/book_marx.clj | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/mulk/benki/book_marx.clj b/src/mulk/benki/book_marx.clj index 61755c0..df5c2ad 100644 --- a/src/mulk/benki/book_marx.clj +++ b/src/mulk/benki/book_marx.clj @@ -59,18 +59,7 @@ -(defn htmlize-description [text] - (letfn [(listify [par] - (when (re-matches #"^(?msu)\s*\*\s+.*" par) - [:ul {} - (map (fn [item] [:li {} item]) - (filter #(not (= "" (string/trim %))) - (string/split par #"(?su)(\n|^)\s*\*\s+")))]))] - (let [input (escape-html text)] - (map (fn [par] - (or (listify par) - [:p {} par])) - (string/split input #"\n\s*?\n"))))) +(def htmlize-description (comp sanitize-html markdown->html)) (defn bookmarks-visible-by [user] (-> bookmarks |