Fix #524
It seems that .test mutates the regular expression, whereas .match does not. Whoo JavaScript!
This commit is contained in:
parent
154187c8f6
commit
3b3ee156f2
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ Elm.Native.Regex.make = function(elm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function contains(re, string) {
|
function contains(re, string) {
|
||||||
return re.test(JS.fromString(string));
|
return JS.fromString(string).match(re) !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function find(n, re, str) {
|
function find(n, re, str) {
|
||||||
|
|
Loading…
Reference in a new issue