Commits

Moritz Heidkamp  committed 0192012

Make crazy-trim slightly less crazy?!

  • Participants
  • Parent commits 74069ef

Comments (0)

Files changed (1)

File lowdown-impl.scm

 
 ;; This is only to make Markdown Test happy
 (define (crazy-trim line)
-  (irregex-replace '(seq (submatch (* #\space)) #\newline)
-                   line
-                   (lambda (m)
-                     (let ((s (irregex-match-substring m 1)))
-                       (if (= 1 (string-length s))
-                           " \n"
-                           "\n")))))
+  (if (equal? line "> \n")
+      line
+      (string-append (string-trim-right line) "\n")))
 
 ;; VerbatimChunk = a:StartList
 ;;                 ( BlankLine { a = cons(mk_str("\n"), a); } )*