Commits

Anonymous committed a66d6dc

Cleanup

Comments (0)

Files changed (1)

               (_ space-new-line)
               (attrs (zero-or-more html-attribute))
               (_ (is #\>))
-              (contents (contents-parser close))
+              (contents (contents-parser el close))
               (_ close))
     (result (html-element el attrs contents))))
 
   (mutually-recursive-parser
    (html-element-parser
     (list (char-seq "a") (char-seq "span"))
-    (lambda (close)
+    (lambda (_ close)
       (->> (preceded-by (none-of close) inline)
            (zero-or-more))))))
 
 ;; HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress
 
 (define (html-block-in-tags* element-parser)
-  (sequence* ((_ (preceded-by (is #\<) space-new-line))
-              (el (any-of html-block-elements))
-              (close (result (html-element-close-parser el)))
-              (_ space-new-line)
-              (attrs (zero-or-more html-attribute))
-              (_ (is #\>))
-              (contents (let ((element (html-block-in-tags* element-parser)))
-                          (->> (preceded-by (none-of close) item)
-                               (any-of element)
-                               (zero-or-more))))
-              (_ close))
-    (result (html-element el attrs contents))))
+  (html-element-parser
+   element-parser
+   (lambda (el close)
+     (let ((element (html-block-in-tags* (char-seq el))))
+       (->> (preceded-by (none-of close) item)
+            (any-of element)
+            (zero-or-more))))))
 
 (define html-block-in-tags
   (html-block-in-tags* html-block-elements))