regexp: Fix / escape in regexp. Fixes validators test.
parent
30d158ccce
commit
f5cea754b5
|
@ -7,7 +7,7 @@ IN: regexp.prettyprint
|
|||
M: regexp pprint*
|
||||
[
|
||||
[
|
||||
[ raw>> "R/ " % % "/" % ]
|
||||
[ raw>> "\\/" "\\\\/" replace "R/ " % % "/" % ]
|
||||
[ options>> options>string % ] bi
|
||||
] "" make
|
||||
] keep present-text ;
|
||||
|
|
|
@ -211,7 +211,7 @@ PRIVATE>
|
|||
dup still-parsing-line? [ (parse-raw) ] [ drop f ] if ;
|
||||
|
||||
: parse-regexp ( accum -- accum )
|
||||
lexer get [ take-until ] [ parse-noblank-token ] bi
|
||||
lexer get [ take-until "\\/" "/" replace ] [ parse-noblank-token ] bi
|
||||
<optioned-regexp> compile-next-match suffix! ;
|
||||
|
||||
PRIVATE>
|
||||
|
|
Loading…
Reference in New Issue