Commits

Anonymous committed cb4e772

Drop html-parser dependency

Comments (0)

Files changed (2)

 (import chicken scheme)
 (use srfi-1 srfi-13 srfi-14 data-structures irregex
-     comparse clojurian-syntax latch sxml-transforms char-set-literals html-parser)
+     comparse clojurian-syntax latch sxml-transforms char-set-literals)
 
 (define (node el parser)
   (sequence* ((content parser))
   (satisfies #[a-za-z0-9]))
 
 (define entity
-  (bind (-> (sequence (is #\&)
-                      (any-of (sequence (is #\#)
-                                        (satisfies (char-set #\X #\x))
-                                        (one-or-more (satisfies #[0-9a-fA-F])))
-                              (sequence (is #\#)
-                                        (one-or-more (satisfies #[0-9])))
-                              (one-or-more alphanumeric-ascii))
-                      (is #\;))
-            (as-string))
-        (o result html-strip)))
-
-;; Quoted =        '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\''
+  (->> (enclosed-by (is #\&)
+                    (any-of (sequence (is #\#)
+                                      (satisfies (char-set #\x #\x))
+                                      (one-or-more (satisfies #[0-9a-fa-f])))
+                            (sequence (is #\#)
+                                      (one-or-more (satisfies #[0-9])))
+                            (one-or-more alphanumeric-ascii))
+                    (is #\;))
+       (as-string)
+       (node '&)))
 
 (define quoted
   (let ((delimiters (satisfies (char-set #\" #\'))))
  (author "Moritz Heidkamp")
  (category parsing)
  (license "BSD")
- (depends comparse clojurian latch sxml-transforms
-          char-set-literals html-parser))
+ (depends comparse clojurian latch sxml-transforms char-set-literals))