picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 9209e1ff4b005089e65bbe7b2295948b107a8b0d
parent f882260aaf66c83fd7f67c03fad50778e239f08c
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 13 Apr 2011 20:20:36 +0200

Patch by meinbg to allow the preservation of white space in XML
Diffstat:
Mlib/xml.l | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/xml.l b/lib/xml.l @@ -1,4 +1,4 @@ -# 30apr10abu +# 13apr11abu # 21jan09 Tomas Hlavaty <kvietaag@seznam.cz> # Check or write header @@ -117,7 +117,8 @@ (prog (char) (and L (link L))) (link L) (loop - (NIL (skip) (quit "Unexpected end of XML" Tok)) + (NIL (if *XmlKeepBlanks (peek) (skip)) + (quit "Unexpected end of XML" Tok) ) (T (and (= "<" (setq X (char))) (= "/" (peek))) (char) (unless (= Tok (till " ^I^M^J/>" T)) @@ -128,7 +129,10 @@ (when (_xml T "<") (link @) ) (link - (pack (xmlEsc (trim (cons X (till "^M^J<"))))) ) ) ) ) ) ) ) ) ) ) ) + (pack + (xmlEsc + ((if *XmlKeepBlanks prog trim) + (cons X (till "<")) ) ) ) ) ) ) ) ) ) ) ) ) ) ) (de xmlEsc (L) (use (@X @Z)