1. Moritz Heidkamp
  2. lowdown


Moritz Heidkamp  committed 773ed5e

Some multi value adaptions to silence the scrutinizer

  • Participants
  • Parent commits 28b439f
  • Branches master

Comments (0)

Files changed (2)

File lowdown-impl.scm

View file
             (one-or-more (preceded-by indent list-block))))
 (define (list-item-node first-block-parser first-block more-blocks)
-  (->> (parse document more-blocks)
-       (cons (parse first-block-parser first-block))
+  (->> (nth-value 0 (parse document more-blocks))
+       (cons (nth-value 0 (parse first-block-parser first-block)))
        (node 'item)))
                     (zero-or-more blank-line))
-    (result (cons 'blockquote (parse document text)))))
+    (result (cons 'blockquote (nth-value 0 (parse document text))))))
 (define html-block-elements
   (->> '("address" "blockquote" "center" "dir" "div" "dl" "fieldset" "form" "h1" "h2" "h3"

File lowdown.scm

View file
   (parse document input memoize: memoize?))
 (define (markdown->sxml #!optional (input (current-input-port)) (memoize? #t))
-  (markdown-sxml->html-sxml (markdown->sxml* input memoize?)))
+  (receive (result remainder)
+      (markdown->sxml* input memoize?)
+    (values (markdown-sxml->html-sxml result) remainder)))
 (define (markdown->html #!optional (input (current-input-port)) (memoize? #t))
-  (-> (markdown->sxml input memoize?)
-      (pre-post-order*  universal-conversion-rules*)
-      (SRV:send-reply)))
+  (receive (result remainder)
+      (markdown->sxml input memoize?)
+    (values (-> result
+                (pre-post-order* universal-conversion-rules*)
+                (SRV:send-reply))
+            remainder)))