diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-10-25 11:18:14 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-10-25 11:18:14 (GMT) |
commit | cd3d9ea937a77c5caad276ac279e550ae74b60d6 (patch) | |
tree | 01f8bf29d4dbade7dc6ad1370421a4543bf2d448 /tools | |
parent | 766b23e722743c0b99c03cf4a035b5b20cb8a88f (diff) | |
download | Qt-cd3d9ea937a77c5caad276ac279e550ae74b60d6.zip Qt-cd3d9ea937a77c5caad276ac279e550ae74b60d6.tar.gz Qt-cd3d9ea937a77c5caad276ac279e550ae74b60d6.tar.bz2 |
doc: Fixed some DITA XML validation errors.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index e1aa519..bb2e817 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1282,10 +1282,16 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // </lq> break; case Atom::RawString: - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","raw-html"); - xmlWriter().writeCharacters(atom->string()); - xmlWriter().writeEndElement(); // </pre> + if (atom->string() == " ") + break; + if (atom->string().startsWith("&")) + xmlWriter().writeCharacters(atom->string()); + else { + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","raw-html"); + xmlWriter().writeCharacters(atom->string()); + xmlWriter().writeEndElement(); // </pre> + } break; case Atom::SectionLeft: if (inSection || inApiDesc) { |