Module:WikitextParser/doc: Difference between revisions

Content deleted Content added
 
(4 intermediate revisions by the same user not shown)
Line 113:
<code>getReferences( wikitext )</code>
 
Returns a table with each value being a reference. This includes self-closing references (like <code><nowiki><ref name="foo" /></nowiki></code>) as well as full references.
 
==== getTables ====
Line 121:
Returns a table with each value being a wiki table.
 
==== getTableIdgetTableAttribute ====
 
<code>getTableIdgetTableAttribute( tableWikitext, attribute )</code>
 
Returns the idvalue of an attribute in the given wiki table. For example the id or the class.
 
==== getTableByIdgetTable ====
 
<code>getTableByIdgetTable( wikitext, id )</code>
 
Returns the wiki table with the given id. If not found, nil will be returned.
Line 143:
<code>getLinks( wikitext )</code>
 
Returns a Lua table with each value being a wiki link. For external links, use [[#getExternalLinks|getExternalLinks]] instead.
 
==== getFileLinks ====
Line 167:
<code>getExternalLinks( wikitext )</code>
 
Returns a Lua table with each value being an external link. For internal links, use [[#getLinks|getLinks]] instead.
 
== See also ==