Commits

Moritz Heidkamp committed a36060a

Support emphasis etc. across line breaks again

Thanks to John Foerch for paying attention

Comments (0)

Files changed (3)

    (enclosed-by (is #\[)
                 (sequence* ((text (zero-or-more
                                    (none-of* (in #\[ #\])
-                                             (any-of normal-line-end inline))))
+                                             inline-or-normal-line-end)))
                             (label (maybe (link-label*))))
                   (result (if label
                               (append text (list "[") label (list "]"))
 (define (surrounded-by char parser)
   (let ((close (enclosed-by
                 (none-of space-char new-line)
-                inline
+                inline-or-normal-line-end
                 parser)))
     (preceded-by (none-of (line-of char))
                  parser
                  (none-of space-char new-line)
-                 (sequence* ((x (-> (none-of* close (repeated blank-line min: 2) inline)
+                 (sequence* ((x (-> (none-of* close
+                                              (repeated blank-line min: 2)
+                                              inline-or-normal-line-end)
                                     (zero-or-more)))
                              (y close))
                    (result (append x (list y)))))))
 (define inline-without-line-end
   (none-of* line-end inline))
 
+(define inline-or-normal-line-end
+  (any-of normal-line-end inline))
+
 (define inlines
   (one-or-more
    (any-of inline-without-line-end

tests/MarkdownTest_1.0.3/Tests/Inline with word wrapping.html

+<p>This is <em>a wrapped line with
+an emphasis</em> across the line end</p>

tests/MarkdownTest_1.0.3/Tests/Inline with word wrapping.text

+This is *a wrapped line with
+an emphasis* across the line end