diff options
author | Andy Wingo <wingo@pobox.com> | 2014-02-27 17:16:29 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-02-27 17:16:29 +0100 |
commit | fc2b8f6c6d347f0f1508b9ed63cb820de3d17276 (patch) | |
tree | 577af8808f2b65d83e348e29c79c95822a872fb8 /module/texinfo.scm | |
parent | fd953d7a1065572ee7aa64ee1592f66e85dea892 (diff) | |
download | guile-fc2b8f6c6d347f0f1508b9ed63cb820de3d17276.tar.gz |
Fix newline preservation in @example with lines beginning with @
* module/texinfo.scm (read-char-data): Preserve newlines in @example and
similar environments in the case when the next line starts with an @.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add a test.
Diffstat (limited to 'module/texinfo.scm')
-rw-r--r-- | module/texinfo.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/texinfo.scm b/module/texinfo.scm index 91bb46d8d..02fec16a1 100644 --- a/module/texinfo.scm +++ b/module/texinfo.scm @@ -1,6 +1,6 @@ ;;;; (texinfo) -- parsing of texinfo into SXML ;;;; -;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. ;;;; Copyright (C) 2004, 2009 Andy Wingo <wingo at pobox dot com> ;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com> ;;;; @@ -765,7 +765,9 @@ Examples: (let* ((token (read-command-token port)) (end? (eq? (token-kind token) 'END))) (values - (handle str-handler fragment (if end? "" " ") seed) + (handle str-handler fragment + (if end? "" (if preserve-ws? "\n" " ")) + seed) token))) ((and (not preserve-ws?) (eq? c #\newline)) ;; paragraph-separator ::= #\newline #\newline+ |