mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Update rewrite-edn and hickory deps
shadow workaround for hickory is no longer needed since hickory got node support
This commit is contained in:
committed by
Tienson Qin
parent
65fb452865
commit
7a5310eb5d
@@ -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))))
|
||||
@@ -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))))
|
||||
|
||||
|
||||
@@ -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]]
|
||||
|
||||
Reference in New Issue
Block a user