Jump to content

Module:Listify: Difference between revisions

From Bronze and Iron: An Andal Invasions AGOT Roleplay Project
en>Abjiklam
No edit summary
(No difference)

Revision as of 13:31, 13 December 2022

Documentation for this module may be created at Module:Listify/doc

return function (str)
  str = str or ""
  str = mw.ustring.gsub(str, "<br%s*/*>", "\n")
  str = mw.ustring.gsub(str, "<BR%s*/*>", "\n")
  str = mw.ustring.gsub(str, "^%*", "\n")
  str = mw.ustring.gsub(str, "\n%*", "\n")

  local t = {}
  for s in mw.ustring.gmatch(str, "([^\n]+)") do
    table.insert(t, s)
  end
  return t
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.