frontend.text conversion WIP

Removed extract-level-spaces b/c it's not used
This commit is contained in:
Gabriel Horner
2022-05-06 17:12:11 -04:00
parent 67461aaede
commit f529777d78
6 changed files with 19 additions and 39 deletions

View File

@@ -1,5 +1,6 @@
(ns frontend.handler.route
(:require [clojure.string :as string]
[frontend.config :as config]
[frontend.date :as date]
[frontend.db :as db]
[frontend.handler.ui :as ui-handler]
@@ -82,7 +83,7 @@
(if block?
(if-let [block (db/entity [:block/uuid (medley/uuid name)])]
(let [content (text/remove-level-spaces (:block/content block)
(:block/format block))]
(:block/format block) (config/get-block-pattern (:block/format block)))]
(if (> (count content) 48)
(str (subs content 0 48) "...")
content))