correct a logical error that would lead to merging unrelated preformatted blocks
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
|
||||
;; add line to most recent preformat block
|
||||
[(symbol=? 'preformatted state)
|
||||
(if (preformatted? (car document))
|
||||
;; little bit hard to follow: take the existing
|
||||
;; preformatted blocks content, cons the new line;
|
||||
;; then, cons the new preformatted block to the cdr of
|
||||
@@ -50,11 +49,7 @@
|
||||
(preformatted-str (car document))))
|
||||
(cdr document))
|
||||
(cdr lines)
|
||||
'preformatted)
|
||||
|
||||
(iter (cons (preformatted (list)) document)
|
||||
(cdr lines)
|
||||
'preformatted))]
|
||||
'preformatted)]
|
||||
|
||||
;; rest of this is normal mode
|
||||
|
||||
@@ -68,7 +63,7 @@
|
||||
;; preformatting toggle lines
|
||||
[(string-prefix? (car lines) "```")
|
||||
;; add preformatted block to document and toggle mode
|
||||
(iter document
|
||||
(iter (cons (preformatted (list)) document)
|
||||
(cdr lines)
|
||||
'preformatted)]
|
||||
|
||||
|
Reference in New Issue
Block a user