Skip to content

Commit a351d9e

Browse files
committed
use %r
1 parent 5f12086 commit a351d9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/java_script.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class JavaScript < Scanner
4545
STRING_CONTENT_PATTERN = {
4646
"'" => /[^\\']+/,
4747
'"' => /[^\\"]+/,
48-
'/' => / (?: [^\\\/\[]+ | \[ ([^\]\\]+ | \\.)* \]? )+ /mx,
48+
'/' => %r{ (?: [^\\/\[]+ | \[ ([^\]\\]+ | \\.)* \]? )+ }mx,
4949
} # :nodoc:
5050
KEY_CHECK_PATTERN = {
5151
"'" => / (?> [^\\']* (?: \\. [^\\']* )* ) ' \s* : /mx,

0 commit comments

Comments
 (0)