xmodes now can't contain whitespace. [ factor { 1 2 3 }] prints literally instead of getting syntax-highlighted

db4
Doug Coleman 2008-09-24 22:22:36 -05:00
parent ca22e075f0
commit 2e5273df52
2 changed files with 5 additions and 1 deletions

View File

@ -141,3 +141,6 @@ link-no-follow? off
[ "<p><a href='Factor'>Factor</a>-rific!</p>" ]
[ "[[Factor]]-rific!" convert-farkup ] unit-test
[ "<p>[ factor { 1 2 3 }]</p>" ]
[ "[ factor { 1 2 3 }]" convert-farkup ] unit-test

View File

@ -38,6 +38,7 @@ TUPLE: line ;
EBNF: parse-farkup
nl = ("\r\n" | "\r" | "\n") => [[ drop "\n" ]]
whitespace = " " | "\t" | nl
heading1 = "=" (!("=" | nl).)+ "="
=> [[ second >string heading1 boa ]]
@ -133,7 +134,7 @@ line = '___'
=> [[ drop line new ]]
named-code = '[' (!('{' | nl | '[').)+ '{' (!("}]").)+ "}]"
named-code = '[' (!('{' | whitespace | '[').)+ '{' (!("}]").)+ "}]"
=> [[ [ second >string ] [ fourth >string ] bi code boa ]]
simple-code