From: Jerome St-Louis Date: Sat, 22 Oct 2016 18:41:16 +0000 (-0400) Subject: ecere/sys/JSON: Adding a new line after
X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=7a5018319e9cc4cf293d9128c0fb0095c39c901e ecere/sys/JSON: Adding a new line after
- Avoiding unwanted differences in docs from how they were imported --- 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