mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
disabled interpolations in normal regexes
This commit is contained in:
@@ -12,7 +12,7 @@ g = 1
|
||||
|
||||
ok y / x/g is 2
|
||||
|
||||
ok 'http://google.com'.match(/:\/\/goog/)
|
||||
ok /:\/[/]goog/.test 'http://google.com'
|
||||
|
||||
obj = {
|
||||
width: -> 10
|
||||
@@ -20,11 +20,6 @@ obj = {
|
||||
}
|
||||
id = 2
|
||||
|
||||
ok ' '.match(/ /)[0] is ' '
|
||||
|
||||
regexp = / /
|
||||
ok ' '.match regexp
|
||||
|
||||
ok (obj.width()/id - obj.height()/id) is -5
|
||||
|
||||
eq /^I'm\s+Heregex?\/\/\//gim + '', ///
|
||||
@@ -32,8 +27,9 @@ eq /^I'm\s+Heregex?\/\/\//gim + '', ///
|
||||
///gim + ''
|
||||
eq '\\\\#{}', ///
|
||||
#{
|
||||
"#{ '\\' }"
|
||||
"#{ '\\' }" # normal comment
|
||||
}
|
||||
# regex comment
|
||||
\#{}
|
||||
///.source
|
||||
eq /// /// + '', '/(?:)/'
|
||||
|
||||
Reference in New Issue
Block a user