aboutsummaryrefslogtreecommitdiff
path: root/doc/markdowndoc.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-03-17 12:12:35 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-03-17 12:12:35 -0400
commit2133025e8c864119ecf48682a899396f0bf6de33 (patch)
treed0220a68759bfe4cc96164433c78ee15bd2cf022 /doc/markdowndoc.lua
parent59689354a64d780eb7ae58ab4839442c32b06aa2 (diff)
downloadtextadept-2133025e8c864119ecf48682a899396f0bf6de33.tar.gz
textadept-2133025e8c864119ecf48682a899396f0bf6de33.zip
Do not link the current page in the navigation list; doc/markdowndoc.lua
Diffstat (limited to 'doc/markdowndoc.lua')
-rw-r--r--doc/markdowndoc.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/markdowndoc.lua b/doc/markdowndoc.lua
index a2a4c6ea..687bb74e 100644
--- a/doc/markdowndoc.lua
+++ b/doc/markdowndoc.lua
@@ -147,10 +147,11 @@ function M.start(doc)
write_nav(f, hierarchy)
f:close()
local p = io_popen('markdown "'..navfile..'"')
- template.nav = p:read('*all')
+ local nav = p:read('*all')
p:close()
-- Write index.html.
+ template.nav = nav
f = io_open(M.options.output_dir..'/api/index.html', 'wb')
local html = HTML:gsub('%%%(([^)]+)%)', template)
f:write(html)
@@ -230,6 +231,7 @@ function M.start(doc)
-- Write HTML.
template.title = name..' - Textadept API'
+ template.nav = nav:gsub('<a[^>]+>('..name:match('[^%.]+$')..')</a>', '%1')
local p = io_popen('markdown -f toc -T "'..mdfile..'"')
template.toc, template.main = p:read('*all'):match('^(.-\n</ul>\n)(.+)$')
p:close()