[utils] Using non capturing groups in js_to_json
This commit is contained in:
parent
e6e9e1f45b
commit
321045a3d5
@ -2112,8 +2112,8 @@ def js_to_json(code):
|
||||
return re.sub(r'''(?sx)
|
||||
"(?:[^"\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^"\\]*"|
|
||||
'(?:[^'\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^'\\]*'|
|
||||
,(?=(\s|(/\*((?!\*/)(\n|.))*\*/))*[\]}])|
|
||||
/\*((?!\*/)(\n|.))*\*/|[a-zA-Z_][.a-zA-Z_0-9]*|
|
||||
,(?=(?:\s|(?:/\*(?:(?!\*/)(?:\n|.))*\*/))*[\]}])|
|
||||
/\*(?:(?!\*/)(?:\n|.))*\*/|[a-zA-Z_][.a-zA-Z_0-9]*|
|
||||
\b(?:0[xX][0-9a-fA-F]+|0+[0-7]+)(?:\s*:)?|
|
||||
[0-9]+(?=\s*:)
|
||||
''', fix_kv, code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user