Module:Citation/CS1/Utilities: Difference between revisions

no edit summary
m>Trappist the monk
No edit summary
m>Trappist the monk
No edit summary
Line 266: Line 266:
return value, selected;
return value, selected;
end
--[=[-------------------------< R E M O V E _ W I K I _ L I N K >----------------------------------------------
Gets the display text from a wikilink like [[A|B]] or [[B]] gives B
]=]
local function remove_wiki_link (str)
return (str:gsub( "%[%[([^%[%]]*)%]%]", function(l)
return l:gsub( "^[^|]*|(.*)$", "%1" ):gsub("^%s*(.-)%s*$", "%1");
end));
end
end


Line 291: Line 304:
wrap_style = wrap_style;
wrap_style = wrap_style;
safe_for_italics = safe_for_italics;
safe_for_italics = safe_for_italics;
remove_wiki_link = remove_wiki_link;
set_selected_modules = set_selected_modules;
set_selected_modules = set_selected_modules;
z = z,
z = z,
}
}
Anonymous user