Skip to content

Commit 9385b67

Browse files
authored
Bump jsoup (#91)
1 parent 27ee318 commit 9385b67

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{:paths ["src/clj" "src/cljc" "src/cljs"]
22
:deps
33
{org.clojure/clojure {:mvn/version "1.11.1"}
4-
org.jsoup/jsoup {:mvn/version "1.14.3"}} ;hold back jsoup upgrade due to graal incompatibility
4+
org.jsoup/jsoup {:mvn/version "1.19.1"}}
55
:aliases
66
{:test {:extra-paths ["test/cljc"]}
77
:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.60"}}}

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
:dependencies [[org.clojure/clojure "1.11.1"]
1313
[org.clojure/clojurescript "1.11.60" :scope "provided"]
14-
[org.jsoup/jsoup "1.15.2"]]
14+
[org.jsoup/jsoup "1.19.1"]]
1515

1616
:source-paths ["src/clj" "src/cljc" "src/cljs"]
1717

src/clj/hickory/core.clj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
DocumentType Element TextNode XmlDeclaration]
88
[org.jsoup.parser Tag Parser]))
99

10+
(set! *warn-on-reflection* true)
11+
1012
(defn- end-or-recur [as-fn loc data & [skip-child?]]
1113
(let [new-loc (-> loc (zip/replace data) zip/next (cond-> skip-child? zip/next))]
1214
(if (zip/end? new-loc)
@@ -68,9 +70,10 @@
6870
DocumentType
6971
(as-hiccup
7072
([this] (trampoline as-hiccup this (hzip/hiccup-zip this)))
71-
([this loc] (end-or-recur as-hiccup loc (utils/render-doctype (.attr this "name")
72-
(.attr this "publicid")
73-
(.attr this "systemid")))))
73+
([this loc]
74+
(end-or-recur as-hiccup loc (utils/render-doctype (.name this)
75+
(.publicId this)
76+
(.systemId this)))))
7477
Element
7578
(as-hiccup
7679
([this] (trampoline as-hiccup this (hzip/hiccup-zip this)))

test/cljc/hickory/test/core.cljc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
(is (= {:type :document,
1818
:content [{:type :document-type,
19-
:attrs {:name "html", :publicid "", :systemid ""}}
19+
:attrs {:name "html", :publicid "", :systemid ""
20+
#?@(:clj [:#doctype "html"])}}
2021
{:type :element,
2122
:attrs nil,
2223
:tag :html,
@@ -57,7 +58,8 @@
5758

5859
(is (= {:type :document,
5960
:content [{:type :document-type,
60-
:attrs {:name "html", :publicid "", :systemid ""}}
61+
:attrs {:name "html", :publicid "", :systemid ""
62+
#?@(:clj [:#doctype "html"])}}
6163
{:type :element,
6264
:attrs nil,
6365
:tag :html,

0 commit comments

Comments
 (0)