45,646
edits
(Created page with "local export = {} local gsub = mw.ustring.gsub function format_def (term, definition) local anchor = gsub(term, "%[%[([^%]]+)%]%]", "%1") -- Remove wikilinks anchor = gsub...") |
No edit summary |
||
Line 26: | Line 26: | ||
function export.link(frame) | function export.link(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local anchor, text = args[1] or "", args[2] | local anchor, text = args[1] or "", args[2] | ||
Line 42: | Line 35: | ||
local lower_anchor = anchor:lower() | local lower_anchor = anchor:lower() | ||
return "[[wikt:Appendix:Glossary#" .. anchor .. "|" .. (text or anchor) .. "]]" | |||
end | end | ||
return export | return export |