Content deleted Content added
Sophivorus (talk | contribs) mNo edit summary |
Sophivorus (talk | contribs) →Usage: Add methods |
||
Line 13:
</syntaxhighlight>
Then, use and combine the available methods
<syntaxhighlight lang="lua">
Line 23:
</syntaxhighlight>
== Methods ==
* <code>getLead( wikitext )</code> — Returns the lead section from the given wikitext. The lead section is defined as everything before the first section title.
* <code>getSections( wikitext )</code> — Returns
* <code>getSection( wikitext, title )</code> — Returns the content of the section with the given title, including subsections. If you don't want subsections, use
* <code>getSectionTag( wikitext, name )</code> — Returns the contents of the <nowiki><section></nowiki> tag with the given name (see [[Help:Labeled section transclusion]]). If the tag is not found, nil will be returned.
* <code>getLists( wikitext )</code> — Returns a sequence of lists, that is, a Lua table with each entry a list.
For the ultimate documentation, see the source code below.
|