This Lua module is used on approximately 73,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages. Consider discussing changes on the talk page before implementing them.
This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing.
This module is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this module's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this module. Please discuss any changes on the talk page before implementing them.
This module implements {{anchor}}. Please see the template page for documentation.
-- This module implements {{anchor}}.localgetArgs=require('Module:Arguments').getArgslocaltableTools=require('Module:TableTools')localp={}functionp.main(frame)-- Get the positional arguments from #invoke, remove any nil values,-- and pass them to p._main.localargs=getArgs(frame)localargArray=tableTools.compressSparseArray(args)returnp._main(unpack(argArray))endfunctionp._main(...)-- Generate the list of anchors.localanchors={...}localret={}for_,anchorinipairs(anchors)doret[#ret+1]='<span id="'..anchor..'"></span>'endreturntable.concat(ret)endreturnp