diff options
author | Eduardo Julian | 2018-08-23 00:56:59 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-23 00:56:59 -0400 |
commit | bc251026c21590da76085bc0bc9abeaa5ec242b6 (patch) | |
tree | 56ba5ff99a5786d2b75a8f96a178c9d095781747 /stdlib/source/lux/data/format | |
parent | a89088576c4e586d3dad18f82eb451ff4eaa14fb (diff) |
No more escaping of new-line.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/data/format/css.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/format/xml.lux | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux index 083195972..fbdad1885 100644 --- a/stdlib/source/lux/data/format/css.lux +++ b/stdlib/source/lux/data/format/css.lux @@ -37,7 +37,7 @@ (if (list.empty? style) "" (format selector "{" (inline style) "}")))) - (text.join-with "\n"))) + (text.join-with text.new-line))) (def: #export (rgb color) (-> Color Value) diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux index a5cb39ab5..0ed744b46 100644 --- a/stdlib/source/lux/data/format/xml.lux +++ b/stdlib/source/lux/data/format/xml.lux @@ -110,9 +110,9 @@ spaced^ (p.after (l.this "/")) (l.enclosed ["<" ">"]))] - (p.assert ($_ text/compose "Close tag does not match open tag.\n" - "Expected: " (name/encode expected) "\n" - " Actual: " (name/encode actual) "\n") + (p.assert ($_ text/compose "Close tag does not match open tag." text.new-line + "Expected: " (name/encode expected) text.new-line + " Actual: " (name/encode actual) text.new-line) (name/= expected actual)))) (def: comment^ @@ -254,10 +254,12 @@ (exception: #export (wrong-tag {tag Name}) (name/encode tag)) +(def: blank-line ($_ text/compose text.new-line text.new-line)) + (exception: #export (unconsumed-inputs {inputs (List XML)}) (|> inputs (list/map (:: Codec<Text,XML> encode)) - (text.join-with "\n\n"))) + (text.join-with blank-line))) (def: #export text (Reader Text) |