fix: newline after timestamps

pull/2264/head
Tienson Qin 2021-06-22 21:46:37 +08:00
parent 2e6414d3be
commit bc2ac786ef
1 changed files with 6 additions and 2 deletions

View File

@ -447,8 +447,12 @@
(paragraph-timestamp-block? block) (paragraph-timestamp-block? block)
(let [timestamps (extract-timestamps block) (let [timestamps (extract-timestamps block)
timestamps' (merge timestamps timestamps) timestamps' (merge timestamps timestamps)
other-body (->> (second block) [timestamps others] (split-with #(= "Timestamp" (first %)) (second block))
(drop-while #(= ["Break_Line"] %)))] other-body (->>
(concat
timestamps
(drop-while #(contains? #{"Hard_Break_Line" "Break_Line"} (first %)) others))
(remove nil?))]
(recur headings (conj block-body ["Paragraph" other-body]) (rest blocks) timestamps' properties last-pos last-level children (conj block-all-content block-content))) (recur headings (conj block-body ["Paragraph" other-body]) (rest blocks) timestamps' properties last-pos last-level children (conj block-all-content block-content)))
(property/properties-ast? block) (property/properties-ast? block)