diff options
-rw-r--r-- | src/definition.cpp | 2 | ||||
-rw-r--r-- | src/tagreader.cpp | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index 86f8789..e18932e 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -528,7 +528,7 @@ void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const SectionInfo *si; for (;(si=sdi.current());++sdi) { - if (!si->generated && si->ref.isEmpty()) + if (!si->generated && si->ref.isEmpty() && !si->label.startsWith("autotoc_md")) { //printf("write an entry!\n"); if (definitionType()==TypeMember) tagFile << " "; diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 8f85e9d..4b99f0d 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -496,6 +496,23 @@ class TagFileParser : public QXmlDefaultHandler void endDocAnchor() { + // Check whether or not the tag is automatically generate, in that case ignore the tag. + switch(m_state) + { + case InClass: + case InFile: + case InNamespace: + case InGroup: + case InPage: + case InMember: + case InPackage: + case InDir: + if (QString(m_curString).startsWith("autotoc_md")) return; + break; + default: + warn("Unexpected tag 'docanchor' found"); + return; + } switch(m_state) { case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break; @@ -506,7 +523,7 @@ class TagFileParser : public QXmlDefaultHandler case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break; case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break; case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break; - default: warn("Unexpected tag 'docanchor' found"); break; + default: break; // will not be reached } } |