Module:etymology: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 151: Line 151:


function export.format_glossary(text, glossary_arg, nocap_arg)
function export.format_glossary(text, glossary_arg, nocap_arg)
     if not glossary_arg then return text end
     if not glossary_arg then return nocap_arg and text or mw.ustring.gsub(text, "^%l", string.upper) end
     local glossary_link = type(glossary_arg) == "string" and glossary_arg or text
     local glossary_link = type(glossary_arg) == "string" and glossary_arg or text
     local glossary_display = nocap_arg and text or mw.ustring.gsub(text, "^%l", string.upper)
     local glossary_display = nocap_arg and text or mw.ustring.gsub(text, "^%l", string.upper)