Skip to content

Commit

Permalink
ecere/sys/JSON: Adding a new line after <br>
Browse files Browse the repository at this point in the history
- Avoiding unwanted differences in docs from how they were imported
  • Loading branch information
jerstlouis committed Oct 22, 2016
1 parent f24de95 commit 7a50183
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/ecereCOM/char-pointer.econ
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
" void Main()<br>"
" {<br>"
" char * helloString = \"Hello, World!\";<br>"
" printf(\"%s\<br>\", helloString);<br>"
" printf(\"%s\\n\", helloString);<br>"
" }<br>"
"}<br>"
"<br>"
Expand Down
11 changes: 11 additions & 0 deletions ecere/src/sys/JSON.ec
Original file line number Diff line number Diff line change
Expand Up @@ -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 <br> as this is how we imported documentor data...
int i;
buffer[b] = 0;
f.Puts(buffer);
f.Puts(">\"\n");
for(i = 0; i<indent; i++) f.Puts(" ");
f.Puts(" \"");
b = 0;
}
else if(ch == '\n')
{
int i;
Expand Down

0 comments on commit 7a50183

Please sign in to comment.