! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs combinators
combinators.short-circuit kernel make math modern modern.slices
-sequences sequences.extras shuffle shuffle.extras splitting
+sequences sequences.extras shuffle combinators.extras splitting
strings unicode ;
IN: modern.html
{ CHAR: \\ CHAR: ' } slice-til-separator-inclusive {
{ f [ to>> over string-expected-got-eof ] }
{ CHAR: ' [ drop ] }
- { CHAR: \\ [ drop next-char-from drop advance-squote-payload ] }
+ { CHAR: \\ [ drop take-char drop advance-squote-payload ] }
} case
] [
string-expected-got-eof
[ "\s\r\n/>" member? ] slice-until ;
: read-value ( n string -- n' string value )
- skip-whitespace next-char-from {
+ skip-whitespace take-char {
{ CHAR: ' [ CHAR: ' read-string >string <squote> ] }
{ CHAR: " [ CHAR: " read-string >string <dquote> ] }
{ CHAR: [ [ "[" throw ] }