Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Documentation

This module generates an external link to the GitHub repository at the (hopefully) current commit hash of the main branch. It is used for pointing somewhere specific in the codebase.

Usage

{{SourceLink|Resources/Prototypes/Entities/Objects/Tools/lantern.yml#L1}}

... which generates the following link: Lua error at line 5: bad argument #3 to 'format' (string expected, got nil).


local SourceLink = {}

function SourceLink.main(frame)
	local args = frame:getParent().args
	return string.format( "[https://github.com/teamstarcup/starcup/blob/master/%s %s]", args[1], args[2] )
end

return SourceLink