squashed trailing space problem with section titles; allowing numbers in links
This commit is contained in:
parent
158aa9ff14
commit
897061ac17
|
@ -346,7 +346,7 @@ end
|
||||||
-- is not empty.
|
-- is not empty.
|
||||||
|
|
||||||
function File:add_document_section(title)
|
function File:add_document_section(title)
|
||||||
local section = title:gsub('%A','_')
|
local section = title:gsub('%W','_')
|
||||||
self:new_item {
|
self:new_item {
|
||||||
name = section,
|
name = section,
|
||||||
class = 'section',
|
class = 'section',
|
||||||
|
|
|
@ -122,7 +122,10 @@ function html.generate_output(ldoc, args, project)
|
||||||
else return name end
|
else return name end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ldoc.no_spaces(s) return (s:gsub('%A','_')) end
|
function ldoc.no_spaces(s)
|
||||||
|
s = s:gsub('%s*$','')
|
||||||
|
return (s:gsub('%W','_'))
|
||||||
|
end
|
||||||
|
|
||||||
function ldoc.titlecase(s)
|
function ldoc.titlecase(s)
|
||||||
return (s:gsub('(%a)(%a*)',function(f,r)
|
return (s:gsub('(%a)(%a*)',function(f,r)
|
||||||
|
|
Loading…
Reference in New Issue