summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-26 11:59:28 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-26 11:59:28 +0100
commitf505ff7a857a15fd5c0040df1e02ffb838c30959 (patch)
treed9d6c8501efbd784f7d6afa8b0b6cb73fed3575a
parentc70875677ff1f89c9a26083065be996987a57927 (diff)
Wiki: Do not clobber WikiWords contained in URIs.
-rw-r--r--src/mulk/benki/wiki.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mulk/benki/wiki.clj b/src/mulk/benki/wiki.clj
index a083247..45affee 100644
--- a/src/mulk/benki/wiki.clj
+++ b/src/mulk/benki/wiki.clj
@@ -20,7 +20,8 @@
(defn- tagsoup-map-text [fun tag-soup]
(let [doc (org.jsoup.Jsoup/parse tag-soup) ]
- (doseq [node (into [] (.select doc "*"))
+ (doseq [node (into [] (.select doc ":not(a):not(a *)"))
+ ;; XPath: //*[not(ancestor-or-self::a)]
subnode (into [] (.childNodes node))]
(when (instance? org.jsoup.nodes.TextNode subnode)
(let [new-node (org.jsoup.nodes.Element.