From 423ac382f9e73bf1ca7fc6b400f98db087cd7d22 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 5 Jun 2024 09:21:25 -0500 Subject: Write executable This involved moving `src' to `lib' and making `bin'. `bin' holds the program, which only imports `jimmy.main' from lib. --- src/html.scm | 61 ------------------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 src/html.scm (limited to 'src/html.scm') diff --git a/src/html.scm b/src/html.scm deleted file mode 100644 index 07cd921..0000000 --- a/src/html.scm +++ /dev/null @@ -1,61 +0,0 @@ -(declare (module (jimmy html))) - -(import scheme (chicken base) - (chicken irregex) - (jimmy emit) - (jimmy util)) - -(define (escape-entities s) - (irregex-replace/all "[&<>]" s - (lambda (m) - (let ((c (irregex-match-substring m))) - (cond - ((equal? c "&") "&") - ((equal? c "<") "<") - ((equal? c ">") ">")))))) - -(define (add-inline-markup s) - (define (char->tag ch tag) - (lambda (s) - (irregex-replace/all `(: ,ch ($ (* (~ ,ch))) ,ch) s - "<" tag ">" 1 "" tag ">"))) - - ((o (char->tag "*" "b") - (char->tag "_" "i") - (char->tag "`" "code")) s)) - -(formats - '((para (line . "~a~%") - (stanza . "
~% ~a
~%")) - (verb (line . "~a~%") - (stanza . "~a
~%"))
- (link (line . "~% ~a~%")) - (hdr1 (line . "~a") - (stanza . "