[utils] Fixing js_to_json * or / in comment

This commit is contained in:
sulyi 2016-11-21 07:18:33 +01:00
parent f1bfbae474
commit d6ba53417a

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*:)