summaryrefslogtreecommitdiff
path: root/src/mulk
diff options
context:
space:
mode:
Diffstat (limited to 'src/mulk')
-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.