cripslock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit a7fbd53eca9b097e565f00d68c6fc6fb89f8843e
parent cee267df839b090bbd4c316b71567702aa1a0d9e
Author: Daniel Barlow <dan@telent.net>
Date:   Thu,  7 Aug 2025 19:36:09 +0100

eat blank lines at start of textile body

Diffstat:
Mtextile.fnl | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/textile.fnl b/textile.fnl @@ -15,7 +15,7 @@ eof (- (P 1)) p (P { 1 :doc - :doc (/ (^ (V :block) 1) #[$...]) + :doc (* (^ (P "\n") 0) (/ (^ (V :block) 1) #[$...])) :block (+ (V :pre) (V :para)) :pre (* (P "<pre>") (V :pre-body) (P "</pre>") @@ -44,6 +44,8 @@ (let [paras (extract-blocks (f:read "*a"))] (expect= (# paras) 4) (expect= (. paras 2) "this is\nalso a paragraph\n"))) + (expect= (extract-blocks "\n\n\nfirst para after some blank lines\n") + ["first para after some blank lines\n\n"]) (expect= (extract-blocks "a para <pre> @@ -57,7 +59,7 @@ la h1. heading") ["a para\n" - "pre. + "pre.\32 some untouchable text that may contain double newlines