Commits

Moritz Heidkamp committed 7962908 Merge

Merge branch 'generic-inline-html-elements'

Comments (0)

Files changed (5)

 (define link-label*
   (recursive-parser
    (enclosed-by (is #\[)
-                (sequence* ((text (-> (none-of* (in #\[ #\]) inline)
-                                      (zero-or-more)))
+                (sequence* ((text (zero-or-more
+                                   (none-of* (in #\[ #\])
+                                             (any-of normal-line-end inline))))
                             (label (maybe (link-label*))))
                   (result (if label
                               (append text (list "[") label (list "]"))
 (define html-inline-element
   (recursive-parser
    (html-element-parser
-    (list (char-seq "a") (char-seq "span"))
+    (as-string (one-or-more (in #[a-zA-Z])))
     (lambda (_ close)
       (->> (none-of* close inline)
            (zero-or-more))))))
 (define inline
   (any-of (is #\>)
           (as-string (one-or-more normal-char))
-          line-end
           ul-or-star-line
           space+
           (strong)

tests/MarkdownTest_1.0.3/Tests/Underscore a.html

+<p>_a</p>

tests/MarkdownTest_1.0.3/Tests/Underscore a.text

+_a

tests/MarkdownTest_1.0.3/Tests/Underscore.html

+<p>_</p>

tests/MarkdownTest_1.0.3/Tests/Underscore.text

+_