Template:Syntaxbox

From Bennu Wiki
Jump to navigation Jump to search

Template

Syntax box template [ work in progress, but doesn't look like it will be finished]

Returns nicely formatted syntax text and a small help section. Everything is made bold except text between [ and ].

Variables:

syntax, // the syntax to format
help, // display help or not (do not pass to use default)

{{#regex:lol[*]code|/[[](.)[]]/| $1 }}

Example

Tryouts

  • {{#regex:lol[*]code|/([~ \r\n\t][[]group[]][~ \r\n\t])/| ( }}
  • {{#regex:lol[*]code|/[[](.)[]]/| $1 }}
  • {{#regex:lol[(]code|/[[][(][]]/| ( }}
  • {{#regex:lol[)]code|/[[][)][]]/| ) }}
  • {{#regex:lol<c<o>>d<lol>e|%([<][^>]*[>])%| $1 }}
  • {{#regex:{{#regex:IF ( <condition> ) [[] <code> []] [(] ELSEIF ( <condition> ) <code> [)][*] [[] ELSE <code> []] END|/[[](.)[]]/| $1 }}|%([<][^>]*[>])%| $1 }}