[e-lang] JSON / XML support in E

Kevin Reid kpreid at mac.com
Mon Feb 22 08:32:58 PST 2010


On Feb 22, 2010, at 10:42, Thomas Leonard wrote:
> The pretty printing inserts a space into the string after the \n:
>
> ? println(text)
> [["hello
> world"]]

This is definitely a bug, in that Terms should have read/print  
consistency. Condensed test cases:

? println(term`foo(["hello\nworld"])`.asText())
foo(["hello
     world"])
? println(term`foo("hello\nworld")`.asText())
foo("hello
world")
? println(term`foo(bar("hello\nworld"))`.asText())
foo(bar("hello
     world"))

The first and third are wrong, the second is acceptable.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>






More information about the e-lang mailing list