Initial SVG text support

This commit is contained in:
alonso.torres 2022-02-14 12:05:07 +01:00
parent c3f57cf900
commit a411cbc640
12 changed files with 465 additions and 229 deletions

View file

@ -311,7 +311,11 @@
xmldata (bw/eval! dom (fn [elem] (.-outerHTML ^js elem)))
nodes (process-text-nodes page)
nodes (d/index-by :id nodes)
result (replace-text-nodes xmldata nodes)]
result (replace-text-nodes xmldata nodes)
;; SVG standard don't allow the entity nbsp.   is equivalent but
;; compatible with SVG
result (str/replace result " " " ")]
;; (println "------- ORIGIN:")
;; (cljs.pprint/pprint (xml->clj xmldata))
;; (println "------- RESULT:")