Update rewrite-edn and hickory deps

shadow workaround for hickory is no longer needed since hickory got node
support
This commit is contained in:
Gabriel Horner
2022-12-07 10:26:57 -05:00
committed by Tienson Qin
parent 65fb452865
commit 7a5310eb5d
5 changed files with 5 additions and 24 deletions

View File

@@ -1,12 +0,0 @@
(ns frontend.extensions.hickory
"A shim for conditional reading of the hickory lib in Node,
which requires DOM"
(:require #?(:node-test [lambdaisland.glogi :as log]
:default [hickory.core :as hickory])))
#?(:node-test (defn html->hiccup
[html]
(log/error :exception "Calling hickory from Node test environment is not expected!"))
:default (defn html->hiccup
[html]
(hickory/as-hiccup (hickory/parse html))))

View File

@@ -4,7 +4,7 @@
[clojure.walk :as walk]
[frontend.config :as config]
[frontend.util :as util]
[frontend.extensions.hickory :as hickory]))
[hickory.core :as hickory]))
(defonce *inside-pre? (atom false))
(defn- hiccup-without-style
@@ -271,7 +271,7 @@
(defn convert
[format html]
(when-not (string/blank? html)
(let [hiccup (hickory/html->hiccup html)
(let [hiccup (hickory/as-hiccup (hickory/parse html))
decoded-hiccup (html-decode-hiccup hiccup)]
(hiccup->doc format decoded-hiccup))))

View File

@@ -1,5 +1,3 @@
;; FIXME
;; this test is not focusable (unable to feed :node-test as reading feature?)
(ns frontend.extensions.zotero.extractor-test
(:require [clojure.edn :as edn]
[clojure.test :as test :refer [deftest is testing]]