diff options
author | Vladimír Vondruš <mosra@centrum.cz> | 2017-11-25 17:37:26 (GMT) |
---|---|---|
committer | Vladimír Vondruš <mosra@centrum.cz> | 2017-11-25 17:37:26 (GMT) |
commit | b6a7abf02652b74872b9c676fcfa545e18d9bde7 (patch) | |
tree | f6ba2e5962f62fbf27f2058e241b36ae5adc373c /templates/xml | |
parent | 4f45bd20d4da7d40c793ec4c4c13558581e995ac (diff) | |
download | Doxygen-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 'templates/xml')
-rw-r--r-- | templates/xml/compound.xsd | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 8affc20..efe1481 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -279,12 +279,16 @@ <xsd:complexType name="highlightType" mixed="true"> <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="sp" /> + <xsd:element name="sp" type="spType" /> <xsd:element name="ref" type="refTextType" /> </xsd:choice> <xsd:attribute name="class" type="DoxHighlightClass" /> </xsd:complexType> + <xsd:complexType name="spType" mixed="true"> + <xsd:attribute name="value" type="xsd:integer" use="optional"/> + </xsd:complexType> + <xsd:complexType name="referenceType" mixed="true"> <xsd:attribute name="refid" type="xsd:string" /> <xsd:attribute name="compoundref" type="xsd:string" use="optional" /> |