Skip to content

Commit 62f6993

Browse files
committed
possible solution for [/] problem
1 parent d385021 commit 62f6993

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/java_script.rb

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

0 commit comments

Comments
 (0)