Skip to content

Commit

Permalink
fix: Text duplication in blocks with a page link and a codeblock
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Sep 19, 2024
1 parent cebd688 commit e8d7d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/frontend/handler/code.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
(cond
;; save block content
(:block/uuid config)
(let [block (db/pull [:block/uuid (:block/uuid config)])
content (:block/title block)
(let [block (db/entity [:block/uuid (:block/uuid config)])
content (:block/raw-title block)
{:keys [start_pos end_pos]} (:pos_meta @(:code-options state))
offset (if (:block/pre-block? block) 0 2)
raw-content (utf8/encode content) ;; NOTE: :pos_meta is based on byte position
Expand Down

0 comments on commit e8d7d20

Please sign in to comment.