Codebase list lua-ldoc / 25fd0b6
escape <> for HTML; uniform 14em navbar; uppercase C steve donovan 9 years ago
3 changed file(s) with 5 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
159159
160160 #navigation {
161161 float: left;
162 width: 18em;
162 width: 14em;
163163 vertical-align: top;
164164 background-color: #f0f0f0;
165165 overflow: visible;
193193 }
194194
195195 #content {
196 margin-left: 18em;
196 margin-left: 14em;
197197 padding: 1em;
198198 width: 700px;
199199 border-left: 2px solid #cccccc;
4646 label = label:gsub('_','\\_')
4747 end
4848 local html = ldoc.href(ref) or '#'
49 label = label or qname
49 label = ldoc.escape(label or qname)
5050 local res = ('<a href="%s">%s</a>'):format(html,label)
5151 return res
5252 end))
5757 if name and do_escape then
5858 label = name:gsub('_', '\\_')
5959 end
60 label = ldoc.escape(label)
6061 if ref then
6162 return ('<a href="%s">%s</a>'):format(ldoc.href(ref),label)
6263 else
2323
2424 local spans = {keyword=true,number=true,string=true,comment=true,global=true,backtick=true}
2525
26 local cpp_lang = {c = true, cpp = true, cxx = true, h = true}
26 local cpp_lang = {C = true, c = true, cpp = true, cxx = true, h = true}
2727
2828 function prettify.lua (lang, fname, code, initial_lineno, pre, linenos)
2929 local res, lexer, tokenizer = List(), require 'ldoc.lexer'