From 37bc0ccc3cfcabbe042fe310943d2518e4bfff94 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Mon, 11 Dec 2006 16:02:55 +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: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-90 --- src/guile/skribilo/engine/lout.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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