From 929102c733f183c1819974323ad513b32261b81c Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Tue, 12 Dec 2006 17:03:02 +0000 Subject: lout engine: Fixed automatic `url-ref' breaking wrt. spacing. * src/guile/skribilo/engine/lout.scm: Use `(srfi srfi-14)'. (lout-split-external-link): Use `char-set-contains?' when looking for whitespace. (lout-make-url-breakable): Do not remove newlines. git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-37 --- src/guile/skribilo/engine/lout.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index b10c4a2..43aa356 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -25,6 +25,7 @@ (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)) @@ -471,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)) @@ -2539,7 +2540,7 @@ (#\_ "_&0ik{}") (#\@ "\"@\"&0ik{}") ,@lout-verbatim-encoding - (#\newline "")))) + (#\newline " ")))) ;*---------------------------------------------------------------------*/ ;* url-ref ... */ -- cgit v1.2.3