From 7a5018319e9cc4cf293d9128c0fb0095c39c901e Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sat, 22 Oct 2016 14:41:16 -0400 Subject: [PATCH] ecere/sys/JSON: Adding a new line after
- Avoiding unwanted differences in docs from how they were imported --- doc/ecereCOM/char-pointer.econ | 2 +- ecere/src/sys/JSON.ec | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/ecereCOM/char-pointer.econ b/doc/ecereCOM/char-pointer.econ index 34692ee..08f2c2d 100644 --- a/doc/ecereCOM/char-pointer.econ +++ b/doc/ecereCOM/char-pointer.econ @@ -16,7 +16,7 @@ " void Main()
" " {
" " char * helloString = \"Hello, World!\";
" - " printf(\"%s\
\", helloString);
" + " printf(\"%s\\n\", helloString);
" " }
" "}
" "
" diff --git a/ecere/src/sys/JSON.ec b/ecere/src/sys/JSON.ec index 3311454..cc793b7 100644 --- a/ecere/src/sys/JSON.ec +++ b/ecere/src/sys/JSON.ec @@ -1479,6 +1479,17 @@ static bool WriteValue(File f, Class type, DataValue value, int indent, bool eCO f.Puts("\\t"); b = 0; } + else if(c >= 4 && ch == '>' && string[c-2] == 'r' && string[c-3] == 'b' && string[c-4] == '<') + { + // Add an automatic newline for
as this is how we imported documentor data... + int i; + buffer[b] = 0; + f.Puts(buffer); + f.Puts(">\"\n"); + for(i = 0; i