issue #76 auto-scroll to avoid breaking identifiers

This commit is contained in:
Steve Donovan 2013-08-27 12:44:04 +02:00
parent 8395d6d9d7
commit f33a09e4d3
3 changed files with 15 additions and 6 deletions

View File

@ -272,6 +272,11 @@ table.function_list td {
table.function_list td.name { background-color: #f0f0f0; ; min-width: 200px; } table.function_list td.name { background-color: #f0f0f0; ; min-width: 200px; }
table.function_list td.summary { width: 100%; } table.function_list td.summary { width: 100%; }
ul.nowrap {
overflow:auto;
whitespace:nowrap;
}
dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
dl.table h3, dl.function h3 {font-size: .95em;} dl.table h3, dl.function h3 {font-size: .95em;}

View File

@ -24,7 +24,6 @@ return [==[
# local use_li = ldoc.use_li # local use_li = ldoc.use_li
# local display_name = ldoc.display_name # local display_name = ldoc.display_name
# local iter = ldoc.modules.iter # local iter = ldoc.modules.iter
# ---local M = ldoc.markup
# local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end # local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end
# local nowrap = ldoc.wrap and '' or 'nowrap' # local nowrap = ldoc.wrap and '' or 'nowrap'
@ -54,7 +53,7 @@ return [==[
# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side # if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side
# for kind, items in module.kinds() do # for kind, items in module.kinds() do
<h2>$(kind)</h2> <h2>$(kind)</h2>
<ul> <ul class="nowrap">
# for item in items() do # for item in items() do
<li><a href="#$(item.name)">$(display_name(item))</a></li> <li><a href="#$(item.name)">$(display_name(item))</a></li>
# end # end
@ -67,7 +66,7 @@ return [==[
# for kind, mods, type in ldoc.kinds() do # for kind, mods, type in ldoc.kinds() do
# if not ldoc.kinds_allowed or ldoc.kinds_allowed[type] then # if not ldoc.kinds_allowed or ldoc.kinds_allowed[type] then
<h2>$(kind)</h2> <h2>$(kind)</h2>
<ul> <ul class="nowrap">
# for mod in mods() do # for mod in mods() do
# if mod.name == this_mod then -- highlight current module, link to others # if mod.name == this_mod then -- highlight current module, link to others
<li><strong>$(mod.name)</strong></li> <li><strong>$(mod.name)</strong></li>
@ -187,10 +186,10 @@ return [==[
<h3>Returns:</h3> <h3>Returns:</h3>
# for i,group in ldoc.ipairs(groups) do local li,il = use_li(group) # for i,group in ldoc.ipairs(groups) do local li,il = use_li(group)
<ol> <ol>
# for r in group:iter() do local type, ctypes = item:return_type(r) # for r in group:iter() do local type, ctypes = item:return_type(r); local rt = ldoc.typename(type)
$(li) $(li)
# if type ~= '' then # if rt ~= '' then
<span class="types">$(ldoc.typename(type))</span> <span class="types">$(rt)</span>
# end # end
$(M(r.text,item))$(il) $(M(r.text,item))$(il)
# if ctypes then # if ctypes then

View File

@ -274,6 +274,11 @@ dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;} dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
dl.table h3, dl.function h3 {font-size: .95em;} dl.table h3, dl.function h3 {font-size: .95em;}
ul.nowrap {
overflow:auto;
whitespace:nowrap;
}
/* stop sublists from having initial vertical space */ /* stop sublists from having initial vertical space */
ul ul { margin-top: 0px; } ul ul { margin-top: 0px; }
ol ul { margin-top: 0px; } ol ul { margin-top: 0px; }