Content deleted Content added
Sophivorus (talk | contribs) No edit summary |
Sophivorus (talk | contribs) →Methods: Document more methods |
||
Line 39:
==== getSection ====
<code>getSection( wikitext,
Returns the content of the section with the given section title, including subsections. If you don't want subsections, use [[#getSections|getSections]] instead. If the given section title appears more than once, only the first will be returned. If the section is not found, nil will be returned.
==== getSectionTag ====
<code>getSectionTag( wikitext,
Returns the contents of the <nowiki><section></nowiki> tag with the given tag name (see [[Help:Labeled section transclusion]]). If the tag is not found, nil will be returned.
==== getLists ====
Line 53:
<code>getLists( wikitext )</code>
Returns a table with each value being a list (ordered or unordered).
==== getParagraphs ====
<code>getParagraphs( wikitext )</code>
Returns a table with each value being a paragraph. Paragraphs are defined as block-level elements that are not lists, templates, files, categories, tables or section titles.
==== getTemplates ====
<code>getTemplates( wikitext )</code>
Returns a table with each value being a template.
==== getTemplate ====
<code>getTemplate( wikitext, templateName )</code>
Returns the template with the given template name.
==== getParameters ====
<code>getParameters( templateWikitext )</code>
Returns a table with the parameter names as keys and the parameter values as values. For unnamed parameters, the keys are numerical.
== See also ==
|