Commits

Anonymous committed cb6cc31

Support Setext headings at end of input

Thanks to ente for reporting the problem.

  • Participants
  • Parent commits 67a2d4d

Comments (0)

Files changed (3)

   (preceded-by space* new-line))
 
 (define terminal-line-end
-  (preceded-by space* new-line end-of-input))
+  (preceded-by space* (zero-or-more new-line) end-of-input))
 
 (define line-break
   (preceded-by (char-seq "  ") normal-line-end (result '(br))))
 (define (setext-bottom char)
   (preceded-by (char-seq (make-string 3 char))
                (zero-or-more (is char))
-               new-line))
+               line-end))
 
 (define (setext-heading* level bottom-char)
   (let ((bottom (setext-bottom bottom-char)))

tests/MarkdownTest_1.0.3/Tests/Setext heading at eof.html

+<h1>Foo</h1>

tests/MarkdownTest_1.0.3/Tests/Setext heading at eof.text

+Foo
+===