Commits

Moritz Heidkamp  committed 7962908 Merge

Merge branch 'generic-inline-html-elements'

  • Participants
  • Parent commits 240e510, 7343570

Comments (0)

Files changed (5)

File lowdown-impl.scm

 (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)

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

+<p>_a</p>

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

+_a

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

+<p>_</p>

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

+_