I have a couple of things that would be nice to add:
-
Examples: Examples for functions would be nice, as they
Code: Select all
examples = {
{
description = "Draws a filled arc"
example = [[
love.graphics.arc('fill',...)
]];
}
{
description = "Draws a line arc, note that the remaining rect lines are also drawn"
example = [[
love.graphics.arc('line',...)
]];
}
}
-
Related: Related pages as they are in the bottom of the wiki pages:
Code: Select all
related = {
"love.graphics.newImage",
"Image",
"CompressedData",
}
-
Links: When you talk about other sections of the API it would be nice to detect that with some simple string matching and get the section of the API where that function is located:
Code: Select all
description = "...You can set where love.filesystem will look by setting the identity with love.filesystem.setIdentity or the t.identity field in conf.lua"
Let's think this is part of love.filesystem description, you could put a link where it says love.filesystem.setIdentity and where it says conf.lua
You could detect this if the string was something like:
Code: Select all
description = "...You can set where love.filesystem will look by setting the identity with [love.filesystem.setIdentity] or the t.identity field in [conf.lua]"
Note that the code is still readable and you can easily guess why there are square brackets, then you could do some string.gmatch magin and easily grab those strings:
Code: Select all
for start,word,end in string.gmatch(description, "()%b[]()") do
--Put a link in that word!
end
Note that for links and related pages you may need a look-up table, since things like "Image" are not easily found, since you dont easily know which module they are in...
What do you say rmcode? Are you interested in any of these ideas?