LDoc2tl/tests/underscore.lua

40 lines
828 B
Lua
Raw Normal View History

2011-07-05 20:19:48 +02:00
--[[-----------
2011-07-06 11:49:50 +02:00
testing underscores and Markdown pre-formatting.
2011-07-05 20:19:48 +02:00
2011-07-06 11:49:50 +02:00
A list may immediately follow a line, if it is indented. Necessary lines
will also be inserted after resuming current indentation.
2011-07-05 20:19:48 +02:00
- a list
2011-07-06 11:49:50 +02:00
- sublist (note the needed indentation for Markdown to recognize this)
- more
2011-07-05 20:19:48 +02:00
* of items
more than one line
- indeed
can keep going
2011-07-06 11:49:50 +02:00
Inline _see references_: look at <_ONE_> and <table.concat>.
Indented code blocks may also follow immediately.
function test(a,b)
return three(a,b)
end
2011-07-05 20:19:48 +02:00
@module underscore
]]
----------
2011-07-06 11:49:50 +02:00
-- A function.
-- Can also use <_TWO_>
2011-07-05 20:19:48 +02:00
function _ONE_() end
-----------
-- another function
-- @see string.format
function _TWO_() end
2011-07-06 11:49:50 +02:00
------
-- a longer summary.
-- @param a
-- @param b
-- @return one
-- - one-1
-- - one-2
-- @return two
function three(a,b) end