浏览代码

fix: block parsing

Tienson Qin 4 年之前
父节点
当前提交
e978a8f972
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 3 1
      src/main/frontend/handler/editor.cljs
  2. 4 4
      yarn.lock

+ 3 - 1
src/main/frontend/handler/editor.cljs

@@ -362,7 +362,9 @@
                              :else
                              (let [content' (str (config/get-block-pattern format) (if block-with-title? " " "\n") content)]
                                [content content']))
-        block (assoc block :block/content content')
+        block (assoc block
+                     :block/content content'
+                     :block/format format)
         block (apply dissoc block (remove #{:block/pre-block?} db-schema/retract-attributes))
         block (block/parse-block block)
         block (if (and first-block? (:block/pre-block? block))

+ 4 - 4
yarn.lock

@@ -6173,10 +6173,10 @@ mkdirp@^0.5.0, mkdirp@^0.5.4, mkdirp@~0.5.1:
   dependencies:
     minimist "^1.2.5"
 
[email protected].5:
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.0.5.tgz#2f36ee21ae50c0ac73ca7eeb6e1f38ec34f422d3"
-  integrity sha512-OUkySx+GokdIRFkMFtwUUX0+THB5WYeK54xaZ1bTv8rDbN4v30WnOCjJxBcPCaWioff+CWoxQnChiJaodpIn8g==
[email protected].6:
+  version "1.0.6"
+  resolved "https://registry.yarnpkg.com/mldoc/-/mldoc-1.0.6.tgz#6b5c822c202207d60fda3d075ade3af452e931ad"
+  integrity sha512-wAFAHX3GkVuTIvDhXASrN9/SGKvcmARgFjtxxrpKofJI7SyUgjtpGWhuziy8UutVeZzrIDG3P+fohDGh/iX6VA==
   dependencies:
     yargs "^12.0.2"