commit 2a6ca8878201c1b9f7d3affa332c07613d1dff2c
parent a25c906fdf4f8936e0b71be6e73782acecd7c1a2
Author: Luke Willis <lukejw@loquat.dev>
Date: Wed, 20 Aug 2025 14:46:19 -0400
Don't screw with cmark as much
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/grug/readers.scm b/grug/readers.scm
@@ -6,10 +6,11 @@
;;; A reader is just a function that takes a string and outputs shtml.
;; Reader that uses cmark to parse markdown into html.
+;; TODO: Fix the newlines scattered across parsed html
(define (cmark md-string)
(let* ((md-pipe (pipe))
(cmark-pipe (pipe))
- (pid (spawn "cmark" '("cmark" "--nobreaks")
+ (pid (spawn "cmark" '("cmark")
#:input (car md-pipe)
#:output (cdr cmark-pipe))))
(put-string (cdr md-pipe) md-string)
@@ -22,4 +23,4 @@
(close-port (car md-pipe))
(waitpid pid)
- (delete '*TOP* (html->shtml (string-delete #\newline html)))))
+ (delete '*TOP* (html->shtml html))))