summaryrefslogtreecommitdiffstats
path: root/testing/032
diff options
context:
space:
mode:
authorVladimír Vondruš <mosra@centrum.cz>2017-11-25 17:37:26 (GMT)
committerVladimír Vondruš <mosra@centrum.cz>2017-11-25 17:37:26 (GMT)
commitb6a7abf02652b74872b9c676fcfa545e18d9bde7 (patch)
treef6ba2e5962f62fbf27f2058e241b36ae5adc373c /testing/032
parent4f45bd20d4da7d40c793ec4c4c13558581e995ac (diff)
downloadDoxygen-b6a7abf02652b74872b9c676fcfa545e18d9bde7.zip
Doxygen-b6a7abf02652b74872b9c676fcfa545e18d9bde7.tar.gz
Doxygen-b6a7abf02652b74872b9c676fcfa545e18d9bde7.tar.bz2
Encode invalid XML characters instead of skipping them.
The <sp> element in <programlisting> has a new optional attribute `value`, which contains value of given invalid ASCII character. In case of space, the `value` attribute is omitted. Use cases for this: including snippets of *very esoteric* languages, markup that makes use of the advanced ASCII formatting characters or for example highlighting a console output containing ANSI color codes (which is my case, in fact). Regarding backwards compatibility -- as files with such ASCII characters are very rare, I don't expect this minor difference in the output to be a problem. Besides that, such ASCII characters are often replaced by a space in many applications anyway. A test snippet was extended to contain a special character so this difference in behavior could be verified.
Diffstat (limited to 'testing/032')
-rw-r--r--testing/032/indexpage.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/testing/032/indexpage.xml b/testing/032/indexpage.xml
index 3a25272..1894ae4 100644
--- a/testing/032/indexpage.xml
+++ b/testing/032/indexpage.xml
@@ -4,7 +4,7 @@
<compoundname>index</compoundname>
<title>My Project</title>
<detaileddescription>
- <para>Some text. <programlisting filename="example_test.cpp"><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> More text. <programlisting filename="example_test.cpp"><codeline lineno="1"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline lineno="2"><highlight class="normal">{</highlight></codeline><codeline lineno="3"><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline lineno="4"><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline lineno="5"><highlight class="normal">}</highlight></codeline><codeline lineno="6"><highlight class="normal"/></codeline></programlisting> End. </para>
+ <para>Some text. <programlisting filename="example_test.cpp"><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>a<sp/>=<sp/></highlight><highlight class="stringliteral">"Some<sp/>special<sp/>character<sp/>here:<sp/><sp value="7"/><sp/>"</highlight><highlight class="normal">;</highlight></codeline><codeline><highlight class="normal"/></codeline><codeline><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> More text. <programlisting filename="example_test.cpp"><codeline lineno="1"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline lineno="2"><highlight class="normal">{</highlight></codeline><codeline lineno="3"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>a<sp/>=<sp/></highlight><highlight class="stringliteral">"Some<sp/>special<sp/>character<sp/>here:<sp/><sp value="7"/><sp/>"</highlight><highlight class="normal">;</highlight></codeline><codeline lineno="4"><highlight class="normal"/></codeline><codeline lineno="5"><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline lineno="6"><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline lineno="7"><highlight class="normal">}</highlight></codeline><codeline lineno="8"><highlight class="normal"/></codeline></programlisting> End. </para>
</detaileddescription>
</compounddef>
</doxygen>