mono-docs: Allow HTML codes in documentation

Summary:
All comments from EO files are HTML-escaped (i.e. "<" is turned into "&lt;"), and this is good.
However all text added by the mono code generator is HTML-escaped too, and that is a pity.
Circumventing the escaping in the generator involves serious code changes so it is simpler to
allow "escaping" characters to avoid escaping...
"<" is turned into "&lt;"
but
"\<" is turned into "<"

If you are giving these strings from C, remember that the backslash needs to be escaped too!
For example: "\\<b\\>Hello\\</b\\>"

This is intended for use in the generators, NOT in the EO docs.

Test Plan: Everything works as before, but now HTML codes can be added from the generators.

Reviewers: lauromoura, vitor.sousa, felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9380
This commit is contained in:
Xavi Artigas 2019-07-23 12:45:17 +02:00
parent 5585420e85
commit d20b8ad42a
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ struct html_escaped_string_generator
case '\'': out.append("&apos;"); break;
case '<': out.append("&lt;"); break;
case '>': out.append("&gt;"); break;
case '\\': if (pos < input.size() - 1) pos++; // Deliberate fallthrough
default: out.append(&input[pos], 1); break;
}
}