mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 01:46:35 +00:00
fix(pdf): friendless break line for pdf selection text
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
[frontend.util :as util]
|
||||
["/frontend/extensions/pdf/utils" :as js-utils]
|
||||
[frontend.db :as front-db]
|
||||
[frontend.loader :refer [load]]))
|
||||
[frontend.loader :refer [load]]
|
||||
[clojure.string :as string]))
|
||||
|
||||
(defonce MAX-SCALE 5.0)
|
||||
(defonce MIN-SCALE 0.25)
|
||||
@@ -156,6 +157,16 @@
|
||||
:height (.-height rect)})]
|
||||
(optimize-client-reacts rects)))))
|
||||
|
||||
(defn fix-selection-text-breakline
|
||||
[text]
|
||||
|
||||
(when-not (string/blank? text)
|
||||
(let [sp "@#~#@"]
|
||||
(-> text
|
||||
(string/replace #"[\r\n]+" sp)
|
||||
(string/replace (str "-" sp) "")
|
||||
(string/replace sp " ")))))
|
||||
|
||||
;; TODO: which viewer instance?
|
||||
(defn next-page
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user