diff options
author | Ludovic Court`es | 2006-12-11 16:02:55 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-12-11 16:02:55 +0000 |
commit | 37bc0ccc3cfcabbe042fe310943d2518e4bfff94 (patch) | |
tree | 76567e08799d8f6510dbbc7a9fa7c5c4e5434af9 /src | |
parent | 86ce503639151de4235f322691571b9f2347c9aa (diff) | |
download | skribilo-37bc0ccc3cfcabbe042fe310943d2518e4bfff94.tar.gz skribilo-37bc0ccc3cfcabbe042fe310943d2518e4bfff94.tar.lz skribilo-37bc0ccc3cfcabbe042fe310943d2518e4bfff94.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 9 |
1 files 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 ... */ |