Package list lua-ldoc / dfdac3f
fix #84; also no_space_before_args=false to stop ldoc putting space between name and arglist of functions Steve Donovan 8 years ago
4 changed file(s) with 15 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
736736 end
737737 opt = m.optchain or m.opt
738738 if opt then
739 acc(' [')
739 acc('[')
740740 npending=npending+1
741741 end
742742 end
142142
143143 function ldoc.display_name(item)
144144 local name = item.display_name or item.name
145 if item.type == 'function' or item.type == 'lfunction' then return name..' '..item.args --  
146 else return name end
145 if item.type == 'function' or item.type == 'lfunction' then
146 if not ldoc.no_space_before_args then
147 name = name..' '
148 end
149 return name..item.args
150 else
151 return name
152 end
147153 end
148154
149155 function ldoc.no_spaces(s)
190190 'readme','all','manual_url', 'ignore', 'colon', 'sort', 'module_file',
191191 'boilerplate','merge', 'wrap', 'not_luadoc', 'template_escape',
192192 'no_return_or_parms','no_summary','full_description','backtick_references', 'custom_see_handler',
193 'no_space_before_args',
193194 }
194195 ldoc_contents = tablex.makeset(ldoc_contents)
195196
2626 function two (one,two,three,four)
2727 end
2828
29
3029 --- third useless function.
3130 -- Can always put comments inline, may
3231 -- be multiple.
3635 age -- int:
3736 -- not less than zero!
3837 )
38
39 ---- function with single optional arg
40 -- @param[opt] one
41 function four (one)
42 end
3943
4044 --- an implicit table.
4145 -- Again, we can use the comments