diff --git a/3x5.js b/3x5.js index 0b1c382..16b29dc 100644 --- a/3x5.js +++ b/3x5.js @@ -55,10 +55,10 @@ let theCard = { Is this markdown-parsed? - [button "No we want to render UI" {noop}] + [button "No we want to render UI" \\{noop}] } { Since we want escapes to work, these blocks [i will] be subject to substitutions. - } + } # A comment para { line endings escaped\ diff --git a/notcl.js b/notcl.js index 38ee7fb..ca02212 100644 --- a/notcl.js +++ b/notcl.js @@ -35,8 +35,8 @@ var Notcl = (() => { Regex(/\}/y).expects("}") ).map(([_left, fragments, _right]) => fragments.join("")); const Word = Choose( - Brace.map((text) => ({ text })), - BasicWord + BasicWord, + Brace.map((text) => ({ text })) ); const CommandTerminator = Choose( @@ -54,7 +54,10 @@ var Notcl = (() => { 0, Sequence(PreWordWhitespace, Word).map(([_padding, word]) => word) ), - Choose(Sequence(PreWordWhitespace, Word), CommandTerminator) + Choose( + Sequence(PreWordWhitespace, Word).expects("whitespace"), + Sequence(AtLeast(0, PreWordWhitespace), CommandTerminator).expects(";") + ) ).map(([word, moreWords, _end]) => [word].concat(moreWords)) ).expects("COMMAND");