-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links #7
Comments
Other option would be to use tables, but I'm not really sure about that description = {
"This is the description of some function and it has some wild",
{text="links.", url="https://www.love2d.org/"},
"It can also have links that redirect to functions like:",
{text="love.filesystem.getDirectoryItems", function={"filesystem","getDirectoryItems"}}
} This makes the function pretty simple though: function (description)
result = ""
for i=1, #description do
if type(description[i]) == "string" then
result = result .. " " .. description[i] --Not sure about the space there
else
result = result .. " " .. description[i].text
end
end
return result
end |
Adding urls from the wiki would be nice for docs too. {
name = 'getContactFilter',
description = 'Returns the function for collision filtering.',
url = 'https://love2d.org/wiki/World:getContactFilter',
variants = {
{
returns = {
{
type = 'function',
name = 'contactFilter',
description = 'The function that handles the contact filtering.'
}
}
}
}
}, |
I added automatic linking to functions and types to the reference generator code, you can see the output here: http://love2d-community.github.io/love-api/test/#Body_getLinearVelocity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As discussed in the forum thread, having local links pointing to other sections of the doc would be nice, also having external links wouldnt hurt either. I would love to work on this feature, just wanted to know what format should we use for the links.
I was thinking that maybe using
to enclose the text would be nice for local links and something like markdown
[]()
syntax for external links.What do you say?
Also there should be a method to get the url for a link (parse the text?), and a method to completely unformat the text (delete the characters
[]()
, ` and links in order to make it clearer)The text was updated successfully, but these errors were encountered: