From bd29e007bee084ff7bf1bc9b49c2fb47d0aa3ff8 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Mon, 21 Apr 2014 20:54:26 +0200 Subject: [PATCH] Removes text TOCs from the symbol index. --- lib/packages/docutils/rstgen.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim index d9d57c4456..8f223ca25f 100644 --- a/lib/packages/docutils/rstgen.nim +++ b/lib/packages/docutils/rstgen.nim @@ -562,8 +562,13 @@ proc readIndexDir(dir: string): inc F # Depending on type add this to the list of symbols or table of APIs. if title.keyword.isNil: - setLen(result.symbols, L + F) for i in 0 .. 0 and toc[0] == ' ': + continue + # Ok, non TOC entry, add it. + setLen(result.symbols, L + 1) result.symbols[L] = fileEntries[i] inc L result.modules.add(path.splitFile.name)