summary refs log tree commit diff stats
path: root/lib/packages/docutils
diff options
context:
space:
mode:
authorNick Greenfield <boyd.greenfield@gmail.com>2014-12-17 17:34:15 -0800
committerNick Greenfield <boyd.greenfield@gmail.com>2014-12-19 21:08:11 -0500
commitfb93cee95de2300f863057efdf163e2413177c3d (patch)
treee1729ae9c117b7c3ef0203150f7bac421b432312 /lib/packages/docutils
parenta58b4cfda7a574f6c8cf090f7ab16531db8815d7 (diff)
downloadNim-fb93cee95de2300f863057efdf163e2413177c3d.tar.gz
Improved nimdoc styling.
This updates the inlined CSS in nimdoc.cfg, adds several helper classes
(and a few divs) to the generated HTML (some in nimdoc.cfg, one in
rstgen.nim), and tweaks the anchor linking scheme for headers in
rstgen.nim.
Diffstat (limited to 'lib/packages/docutils')
-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 fc60b3672..09373ac9e 100644
--- a/lib/packages/docutils/rstgen.nim
+++ b/lib/packages/docutils/rstgen.nim
@@ -688,7 +688,7 @@ proc renderHeadline(d: PDoc, n: PRstNode, result: var string) =
     d.tocPart[length].header = tmp
 
     dispA(d.target, result, "\n<h$1><a class=\"toc-backref\" " &
-      "id=\"$2\" href=\"#$2_toc\">$3</a></h$1>", "\\rsth$4{$3}\\label{$2}\n",
+      "id=\"$2\" href=\"#$2\">$3</a></h$1>", "\\rsth$4{$3}\\label{$2}\n",
       [$n.level, d.tocPart[length].refname, tmp, $chr(n.level - 1 + ord('A'))])
   else:
     dispA(d.target, result, "\n<h$1 id=\"$2\">$3</h$1>", 
@@ -836,7 +836,7 @@ proc buildLinesHTMLTable(params: CodeBlockParams, code: string):
 
   var codeLines = 1 + code.strip.countLines
   assert codeLines > 0
-  result.beginTable = """<table><tbody><tr><td class="blob-line-nums"><pre>"""
+  result.beginTable = """<table class="line-nums-table"><tbody><tr><td class="blob-line-nums"><pre>"""
   var line = params.startLine
   while codeLines > 0:
     result.beginTable.add($line & "\n")