1,686 bytes added
, 22:00, 15 July 2021
{{module rating|alpha}}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
== Usage ==
<code>{{#invoke:{{BASEPAGENAME}}|main|''regex''|''page name''|''style''}}</code>
* ''regex'' is a Lua pattern (a somewhat limited form of [[regular expression]] -- see [[mw:Extension:Scribunto/Lua_reference_manual#Patterns]]). Note that quotes around the regex are ''not'' needed and captures should have no effect (however, you can use them to break up blocks of [ or { characters that interfere with the processing of the #invoke block). Omitting the regex results in blank output.
* ''page'' is the name of the page to highlight. However, it can be omitted, in which case the current page is used. However, if the page name ends in "/highlight", then that part is removed before the page is looked up.
* ''style'' is an optional parameter. In addition to the default, it can presently be "yellow" for a classic yellow highlighter look, or "oval" for a bolder, oval-ish red outline. The span style="..." statements for accomplishing this are defined near the top of the module for your convenience in editing.
* All of these parameters can be passed with names (regex = , page = , style =) if desired.
* Therefore, a convenient way to use this function is to preview the text <code><nowiki>{{#invoke:Highlight|main|''regex''}}</nowiki></code> at ''(your-page-name)''/highlight to view the text of ''(your-page-name)'' with markup added. Unless you'd like to share the marked-up text with others you shouldn't Save the page.
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
}}</includeonly>