diff options
author | albert-github <albert.tests@gmail.com> | 2018-12-03 10:27:09 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-12-03 10:27:09 (GMT) |
commit | 400de444ef9b0569b2803dc4a8e5497c181384ce (patch) | |
tree | 41f8e46b170e4b93fd477fe9bc9db55ee0013020 /src/dot.cpp | |
parent | d33a129d784f2b0f823f14a008e929513b302ad3 (diff) | |
download | Doxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.zip Doxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.tar.gz Doxygen-400de444ef9b0569b2803dc4a8e5497c181384ce.tar.bz2 |
Incorrect tag sequence possible for images possible in case of xhtml
Message:
`< Element map content does not follow the DTD, expecting ((p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | menu | dir | pre | hr | blockquote | address | center | noframes | isindex | fieldset
| table | form | noscript | ins | del | script)+ | area+), got (area area div)`
The problem first surfaced with test 11 (empty map tag), but the solution given at that moment (`<div/>)`) did work for test 11, but was not correct for test 27.
Problem can be seen with the default doxygen test 27 (`[027_extends.c]: test the \extends, \implements, \memberof, \private, and \public commands`).
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index d82ffa8..dd34411 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1108,12 +1108,18 @@ bool DotFilePatcher::run() int n = sscanf(line.data()+i,"<!-- MAP %d",&mapId); if (n==1 && mapId>=0 && mapId<(int)m_maps.count()) { + QGString result; + FTextStream tt(&result); Map *map = m_maps.at(mapId); //printf("patching MAP %d in file %s with contents of %s\n", // mapId,m_patchFile.data(),map->mapFile.data()); - t << "<map name=\"" << map->label << "\" id=\"" << map->label << "\">" << endl; - convertMapFile(t,map->mapFile,map->relPath,map->urlOnly,map->context); - t << "</map>" << endl; + convertMapFile(tt,map->mapFile,map->relPath,map->urlOnly,map->context); + if (!result.isEmpty()) + { + t << "<map name=\"" << map->label << "\" id=\"" << map->label << "\">" << endl; + t << result; + t << "</map>" << endl; + } } else // error invalid map id! { @@ -4315,13 +4321,18 @@ void writeDotImageMapFromFile(FTextStream &t, } else // bitmap graphics { - t << "<img src=\"" << relPath << imgName << "\" alt=\"" - << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl - << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">"; - - convertMapFile(t, absOutFile, relPath ,TRUE, context); + QGString result; + FTextStream tt(&result); - t << "</map>" << endl; + t << "<img src=\"" << relPath << imgName << "\" alt=\"" + << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl; + convertMapFile(tt, absOutFile, relPath ,TRUE, context); + if (!result.isEmpty()) + { + t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">"; + t << result; + t << "</map>" << endl; + } } d.remove(absOutFile); } |