summary refs log tree commit diff stats
path: root/lib/packages/docutils/rstgen.nim
diff options
context:
space:
mode:
authorDustin Lacewell <dlacewell@gmail.com>2015-01-12 11:20:26 -0800
committerDustin Lacewell <dlacewell@gmail.com>2015-01-12 11:20:26 -0800
commit9e4ee03c2c903875213ee66f35ad08185dc1331f (patch)
tree3dad7e0aca982be52f98254019f49f1ec6c13b68 /lib/packages/docutils/rstgen.nim
parentff941fd489e7340a2138550756572b01774f11ef (diff)
downloadNim-9e4ee03c2c903875213ee66f35ad08185dc1331f.tar.gz
Replace other common expressions with defined variable
Diffstat (limited to 'lib/packages/docutils/rstgen.nim')
-rw-r--r--lib/packages/docutils/rstgen.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim
index 811ca1c6e..14614b2ed 100644
--- a/lib/packages/docutils/rstgen.nim
+++ b/lib/packages/docutils/rstgen.nim
@@ -420,9 +420,9 @@ proc generateSymbolIndex(symbols: seq[TIndexEntry]): string =
     let keyword= symbols[i].keyword
     let cleaned_keyword = keyword[1..keyword.high - 1]
     result.addf("<dt><a name=\"$2\" href=\"#$2\"><span>$1:</span></a></dt><ul class=\"simple\"><dd>\n",
-                [symbols[i].keyword, cleaned_keyword])
+                [keyword, cleaned_keyword])
     var j = i
-    while j < symbols.len and symbols[i].keyword == symbols[j].keyword:
+    while j < symbols.len and keyword == symbols[j].keyword:
       let
         url = symbols[j].link
         text = if not symbols[j].linkTitle.isNil: symbols[j].linkTitle else: url