modern: Fix rewriting ![[ ]] and ![=[ ]=]
parent
f52694159f
commit
8eea6188bd
|
@ -241,3 +241,12 @@ IN: modern.tests
|
|||
{ "<BAR" { } "BAR>" }
|
||||
}
|
||||
} [ "foo:: <FOO FOO> [ 0 ] [ 1 ] [ 2 ] [ 3 ] <BAR BAR>" string>literals >strings ] unit-test
|
||||
|
||||
|
||||
{ t } [ "![[ ]]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
{ t } [ "![=[ ]=]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
{ t } [ "![==[ ]==]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
|
||||
{ t } [ "foo[[ ]]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
{ t } [ "foo[=[ ]=]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
{ t } [ "foo[==[ ]==]" [ rewrite-string-exact ] keep sequence= ] unit-test
|
||||
|
|
|
@ -131,7 +131,7 @@ MACRO:: read-matched ( ch -- quot: ( n string tag -- n' string slice' ) )
|
|||
|
||||
: take-comment ( n string slice -- n' string comment )
|
||||
2over ?nth char: \[ = [
|
||||
[ 1 + ] 2dip 2over ?nth read-double-matched-bracket
|
||||
[ 1 + ] 2dip 1 modify-to 2over ?nth read-double-matched-bracket
|
||||
] [
|
||||
[ slice-til-eol drop ] dip swap 2array
|
||||
] if ;
|
||||
|
|
Loading…
Reference in New Issue