aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fill_layout.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/fill_layout.lua b/scripts/fill_layout.lua
index c0ecf890..a60584dc 100755
--- a/scripts/fill_layout.lua
+++ b/scripts/fill_layout.lua
@@ -8,7 +8,7 @@
local p = io.popen('markdown -f toc -T ' .. arg[1])
local html = p:read('*a'):match('^.-\n</ul>\n(.+)$')
html = html:gsub('<h(%d) id="([^"]+)"', function(n, id)
- id = id:gsub('%p+', '-'):gsub('%-$', ''):lower()
+ id = id:gsub('%p+', '-'):gsub('%-$', ''):lower():gsub('^l%-', '')
return string.format('<h%d id="%s"', n, id)
end)
p:close()