Browse Source

fix: missing newline after multiline block when exporting a page

falldio 1 year ago
parent
commit
9c2cea030b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/main/frontend/handler/export/text.cljs

+ 4 - 0
src/main/frontend/handler/export/text.cljs

@@ -359,6 +359,10 @@
             (when (and origin-ast newline-after-block? (not current-block-is-first-heading-block?))
               [(newline* 2)])
             (mapcatv inline-ast->simple-ast ast-content)
+            (let [last-element (last ast-content)
+                  [last-element-type] last-element]
+              (when (and newline-after-block? (= "Break_Line" last-element-type))
+                (inline-break-line)))
             [(newline* 1)]))
          "Paragraph_line"
          (assert false "Paragraph_line is mldoc internal ast")