summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/html_escaped_string.hpp
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-07-23 12:45:17 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-07-23 21:53:01 +0200
commitd20b8ad42adf8ce6968fc39c38960cf933218780 (patch)
tree25f5eca797d1241f1257aa2f9c7e052a0df90c37 /src/lib/eolian_cxx/grammar/html_escaped_string.hpp
parent5585420e858bbb17ae3b7cc599b4a0f2eb178075 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/lib/eolian_cxx/grammar/html_escaped_string.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp
index 9a6eef1f7c..371afcda24 100644
--- a/src/lib/eolian_cxx/grammar/html_escaped_string.hpp
+++ b/src/lib/eolian_cxx/grammar/html_escaped_string.hpp
@@ -26,6 +26,7 @@ struct html_escaped_string_generator
26 case '\'': out.append("&apos;"); break; 26 case '\'': out.append("&apos;"); break;
27 case '<': out.append("&lt;"); break; 27 case '<': out.append("&lt;"); break;
28 case '>': out.append("&gt;"); break; 28 case '>': out.append("&gt;"); break;
29 case '\\': if (pos < input.size() - 1) pos++; // Deliberate fallthrough
29 default: out.append(&input[pos], 1); break; 30 default: out.append(&input[pos], 1); break;
30 } 31 }
31 } 32 }