[utils] Fixing js_to_json *or / in comment

This commit is contained in:
sulyi 2016-11-22 02:34:42 +01:00
parent 9a2ef3f7fd
commit 3e4207a7ba

View File

@ -2115,7 +2115,7 @@ def js_to_json(code):
return re.sub(r'''(?sx)
"(?:[^"\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^"\\]*"|
'(?:[^'\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^'\\]*'|
/\*[^*]*\*/|,(?=(\s|(/\*[^*]*\*/))*[\]}])|
/\*((?!\*/)\n|.)*\*/|,(?=(\s|(/\*((?!\*/)\n|.)*\*/))*[\]}])|
[a-zA-Z_][.a-zA-Z_0-9]*|
\b(?:0[xX][0-9a-fA-F]+|0+[0-7]+)(?:\s*:)?|
[0-9]+(?=\s*:)