diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-12-01 19:58:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 19:58:34 (GMT) |
commit | a9e47f4c58c79d4af1b8e319bd1a56277bdfee8a (patch) | |
tree | 8444d400ea2c124096ca7df8d136d2512d36522c | |
parent | a1c6157bba48fe87c38428e75e9e3476e2f2faf1 (diff) | |
parent | ea361e255efa1286566fef7f38c1ce5a01a44f33 (diff) | |
download | Doxygen-a9e47f4c58c79d4af1b8e319bd1a56277bdfee8a.zip Doxygen-a9e47f4c58c79d4af1b8e319bd1a56277bdfee8a.tar.gz Doxygen-a9e47f4c58c79d4af1b8e319bd1a56277bdfee8a.tar.bz2 |
Merge pull request #6516 from albert-github/feature/issue_6513_2
Does not generate TOC for markdown
-rw-r--r-- | src/markdown.cpp | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index a3d8c03..b00070e 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -867,7 +867,15 @@ static int processLink(GrowBuf &out,const char *data,int,int size) } if (isToc) // special case for [TOC] { - out.addStr("@tableofcontents"); + int level = Config_getInt(TOC_INCLUDE_HEADINGS); + if (level > 0 && level <=5) + { + char levStr[10]; + sprintf(levStr,"%d",level); + out.addStr("@tableofcontents{html:"); + out.addStr(levStr); + out.addStr("}"); + } } else if (isImageLink) { @@ -1921,27 +1929,6 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size) out.addStr(" "); out.addStr(header); out.addStr("\n"); - SectionInfo *si = Doxygen::sectionDict->find(id); - if (si) - { - if (si->lineNr != -1) - { - warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",header.data(),si->fileName.data(),si->lineNr); - } - else - { - warn(g_fileName,g_lineNr,"multiple use of section label '%s', (first occurrence: %s)",header.data(),si->fileName.data()); - } - } - else - { - si = new SectionInfo(g_fileName,g_lineNr,id,header,type,level); - if (g_current) - { - g_current->anchors->append(si); - } - Doxygen::sectionDict->append(id,si); - } } else { |