Module:nn-root

local lang = require("Module:languages").getByCode("nn") local links = require("Module:links")

local export = {}

function export.main(frame) local PAGENAME = mw.title.getCurrentTitle.text local args = frame:getParent.args local root = '' if args[1] and args[1] ~= '' then root = args[1]:gsub('[ae]$', '') else root = PAGENAME:gsub('[ae]$', '') end

return root end

function export.gname(frame) local PAGENAME = mw.title.getCurrentTitle.text local args = frame:getParent.args local root = '' if args[2] and args[2] ~= '' then root = args[2]:gsub('[ae]$', '') else root = PAGENAME:gsub('[ae]$', '') end

return root end

return export