txon: can just use replace instead of re-replace.

db4
John Benediktsson 2014-04-22 17:52:57 -07:00
parent 478cc0bb98
commit 2ed87ace0f
1 changed files with 4 additions and 4 deletions

View File

@ -2,15 +2,15 @@
! See http://factorcode.org/license.txt for BSD license ! See http://factorcode.org/license.txt for BSD license
USING: assocs combinators combinators.short-circuit formatting USING: assocs combinators combinators.short-circuit formatting
grouping hashtables io kernel make math math.parser regexp grouping hashtables io kernel make math math.parser sequences
sequences splitting strings unicode.categories ; splitting strings unicode.categories ;
IN: txon IN: txon
<PRIVATE <PRIVATE
: decode-value ( string -- string' ) : decode-value ( string -- string' )
R" \\`" "`" re-replace ; "\\`" "`" replace ;
: `? ( ch1 ch2 -- ? ) : `? ( ch1 ch2 -- ? )
[ CHAR: \ = not ] [ CHAR: ` = ] bi* and ; [ CHAR: \ = not ] [ CHAR: ` = ] bi* and ;
@ -58,7 +58,7 @@ PRIVATE>
<PRIVATE <PRIVATE
: encode-value ( string -- string' ) : encode-value ( string -- string' )
R" `" "\\`" re-replace ; "`" "\\`" replace ;
PRIVATE> PRIVATE>