Section:: = SectionHeader
| SectionHeader (nl|br) >> Pars <<
> SectionHeader (nl|br) Pars
-SectionHeader:: = (^"=" [=]++) ws (Text &~ ... "\n" ...)
+SectionHeader:: = (^"=" [=]++) ws (Text & ~[\n]*)
Pars:: = (Par <<* & indent.Balanced &~ "=" ...) */ br
> `TextWS Atom
| `TextWS (Command:: "\\" ("":: [a-zA-Z0-9:]++ &~ "pre") Block)
| `TextWS (Command:: "\\" ("":: [a-zA-Z0-9:]++ &~ "pre") -> ~"{")
- | `TextWS (Quotes:: "\"" (Text &~ ... "\"" ...) "\"")
+ | `TextWS (Quotes:: "\"" (Text & ~[\"]*) "\"")
| `TextWS glyph
- > `TextWS (Word:: sym)
+ > `TextWS sym
> `Text (WS:: br) >> (Pars -> <<) // subparagraph
href = url.Email
styled = Underline:: "__" Text "__"
| Footnote:: "((" Text "))"
- | TT:: "[[" ws (Text &~ ... "]]" ...) ws "]]"
+ | TT:: "[[" ws (Text & ((~[\]]! | "]" -> ~[\]])*)) ws "]]"
| Strikethrough:: "!!" Text "!!"
| Superscript:: "^^" Atom
| Subscript:: ",," Atom
- | Bold:: "++" (Text &~ ... "++" ...) "++"
- | Highlight:: "##" (Text &~ ... "##" ...) "##"
- | Math:: "$$" (~[$] | ([$] -> ~[$]))+ "$$"
+ | Bold:: "++" (Text & ((~[\+]! | "+" -> ~[\+])*)) "++"
+ | Highlight:: "##" (Text & ((~[\#]! | "#" -> ~[\#])*)) "##"
+ | Math:: "$$" (~[\$] | ([\$] -> ~[\$]))+ "$$"
| Keyword:: "!" Atom
- | Italic:: "**" (Text &~ ... "**" ...) "**"
+ | Italic:: "**" (Text & ((~[\*]! | "*" -> ~[\*])*)) "**"
-glyph = ^"(e)" | ^"(r)" | ^"(c)" | ^"(tm)" | ^"--"
+glyph = ^"(e)" | ^"(r)" | ^"(c)" | ^"(tm)" | ^"--" | ^"---"
| ^"..." | ^"<-" | ^"<=" | ^"=>" | ^"<->"
| ^"<=>" | ^"<-" | ^"^o"
// ^"->"
+
+
+
// Chars ///////////////////////////////////////////////////////////////
-sym = "\\" ~tok.alphanum
- | ~(tok.alphanum | [\r\n \\{}>><<])
+sym = Word:: "\\" ~tok.alphanum
+ | Word:: ~(tok.alphanum | [\r\n \\{}>><<])
hws! = [ \r>>]
ws! = (hws* "\n")? hws* -> ~[ \n\r]