grammar WikiCreole rule Page Block* end rule Block Heading / Paragraph / List / Preformatted / HorizontalLine / EmptyLine end rule EmptyLine Whitespace* LineEnd end rule HorizontalLine "----" "-"* Whitespace* LineEnd end rule Heading Heading3 / Heading2 / Heading1 end rule Heading1 '==' Whitespace* HeadingText Whitespace* '='* Whitespace* LineEnd end rule Heading2 '===' Whitespace* HeadingText Whitespace* '='* Whitespace* LineEnd end rule Heading3 '====' Whitespace* HeadingText Whitespace* '='* Whitespace* LineEnd end rule HeadingText TextPart+ end rule Preformatted '{{{' Whitespace* LineEnd PreformattedLine* LineStart Whitespace* '}}}' Whitespace* LineEnd end rule PreformattedLine .* LineEnd end rule Paragraph TextLine+ end rule TextLine !'==' TextPart+ LineEnd end rule TextPart PlaceHolder / Image / Link / BoldText / ItalicText / NormalText end rule ItalicText '//' TextPart+ '//' end rule BoldText '**' TextPart+ '**' end rule NormalText [^\n]+ end rule PlaceHolder '<<' [0-9]+ '>>' end rule Image ImageWithAlt / ImageWithoutAlt end rule ImageWithAlt '{{' ImageAddress '|' '}}' end rule ImageWithoutAlt '{{' ImageAddress '}}' end rule ImageAddress URL / ImageFile / PageName end rule ImageFile .* '.' ImageFileExtension end rule ImageFileExtension 'gif' / 'jpg' / 'jpeg' / 'png' / 'svg' end rule Link LinkWithoutText / LinkWithText end rule LinkWithText '[[' LinkAddress '|' LinkText ']]' end rule LinkWithoutText '[[' LinkAddress ']]' end rule LinkAddress PageName / URL end rule URL URLProtocol ':' RestOfURL end rule URLProtocol 'http' / 'https' / 'ftp' / 'mailto' / 'news' / 'irc' end rule RestOfURL .* end rule PageName [a-zA-Z0-9.?!_ -]+ end rule List FirstListElement ListElement* end rule FirstListElement FirstBullet / FirstNumber end rule FirstBulletElement '*' Whitespace TextPart* end rule FirstNumberElement '#' Whitespace TextPart* end rule BulletElement '*' Whitespace TextPart* end rule NumberElement '#' Whitespace TextPart* end rule FirstBullet '*' end rule FirstNumber '#' end rule LineEnd [\n] end rule Whitespace [ \t] end end