aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/engine/lout.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile/skribilo/engine/lout.scm')
-rw-r--r--src/guile/skribilo/engine/lout.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 6106f35..43aa356 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -24,6 +24,8 @@
(define-skribe-module (skribilo engine lout)
+ :use-module (srfi srfi-13)
+ :use-module (srfi srfi-14)
:autoload (ice-9 popen) (open-output-pipe)
:autoload (ice-9 rdelim) (read-line))
@@ -470,9 +472,9 @@
(let ((split (let loop ((where 10))
(if (= 0 where)
10
- (if (char=? (string-ref text
- (- where 1))
- #\space)
+ (if (char-set-contains?
+ char-set:whitespace
+ (string-ref text (- where 1)))
(loop (- where 1))
where)))))
`(,(ref :url url :text (substring text 0 split))
@@ -1673,8 +1675,12 @@
;; Program lines appear within a `lines @Break' block.
(markup-writer '&prog-line
:before (lambda (n e)
- (let ((n (markup-ident n)))
- (if n (skribe-eval (it (list n) ": ") e))))
+ (let ((num (markup-option n :number)))
+ (if (number? num)
+ (skribe-eval
+ (it (string-append (string-pad (number->string num) 3)
+ ": "))
+ e))))
:after "\n")
;*---------------------------------------------------------------------*/
@@ -2534,7 +2540,7 @@
(#\_ "_&0ik{}")
(#\@ "\"@\"&0ik{}")
,@lout-verbatim-encoding
- (#\newline ""))))
+ (#\newline " "))))
;*---------------------------------------------------------------------*/
;* url-ref ... */