Chinazi Wiki Module:RSI


From Chinazi Wiki
Revision as of 02:11, 27 August 2021 by Mengwanzhou (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Module documentation[view][edit][history][purge]
This documentation is transcluded from Module:RSI/doc. Changes can be proposed in the talk page.

Module:RSI optionally adds "" to url if it is not present.

-- Optionally add "" to url if it is not present. 
local p = {}
function p.rsi_url(frame)
  local base_url = ""
  local support_url = ""
  local url = frame.args[1]
  local return_val
  if (string.sub(url,1,string.len(base_url))==base_url) or (string.sub(url,1,string.len(support_url))==support_url) then
    return_val = url
    return_val = base_url .. url
  return return_val
return p