Commits

Moritz Heidkamp  committed d182910

Some cosmetics

  • Participants
  • Parent commits 0e049d7

Comments (0)

Files changed (1)

File lowdown-impl.scm

 
 (define (node el parser)
   (sequence* ((content parser))
-    (result (list el content))))
+    (result (if (list? content)
+                (cons el content)
+                (list el content)))))
 
 (define end-of-input
   (preceded-by (none-of item) (result #\newline)))
     (preceded-by (none-of (line-of char))
                  parser
                  (none-of space-char new-line)
-                 (sequence
-                   (-> (preceded-by (none-of close) inline)
-                       (zero-or-more))
-                   close))))
+                 (sequence* ((x (-> (preceded-by (none-of close) inline)
+                                    (zero-or-more)))
+                             (y close))
+                   (result (append x (list y)))))))
 
 (define emph
   (mutually-recursive-parser