mirror of
https://github.com/tc39/test262.git
synced 2025-07-16 18:44:38 +02:00
Lint: make esid check allow "%" (#1638)
This commit is contained in:
parent
ccaa9571ea
commit
ae925f6791
@ -8,11 +8,12 @@ class CheckEsid(Check):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
#self.es5idRegex = re.compile(r"^S?(B|\d+)(\.\d+)+(-(\d+|[a-z]|i+))*(_A\d(\.\d+)?(_T\d(\.\d+)?)?)?$")
|
#self.es5idRegex = re.compile(r"^S?(B|\d+)(\.\d+)+(-(\d+|[a-z]|i+))*(_A\d(\.\d+)?(_T\d(\.\d+)?)?)?$")
|
||||||
self.es6idRegex = re.compile(r"^(S?(B|\d+)(\.\d+)+(((_A\d\.\d)?_T?\d)|[ _]S\d+(\.[a-z])*)?(, |$))+")
|
self.es6idRegex = re.compile(r"^(S?(B|\d+)(\.\d+)+(((_A\d\.\d)?_T?\d)|[ _]S\d+(\.[a-z])*)?(, |$))+")
|
||||||
# Simpliiied version of the WhatWG URL specification for fragment
|
# Simplified version of the WhatWG URL specification for fragment
|
||||||
# parsing
|
# parsing:
|
||||||
# https://url.spec.whatwg.org/#fragment-state
|
# https://url.spec.whatwg.org/#fragment-state
|
||||||
|
# However, that must also include "%"
|
||||||
self.esidRegex = re.compile(
|
self.esidRegex = re.compile(
|
||||||
u"^[a-z0-9!$&'()*+,\-./:;=?@_~\u00a0-\U0010fffd]+$", re.IGNORECASE
|
u"^[a-z0-9!$%&'()*+,\-./:;=?@_~\u00a0-\U0010fffd]+$", re.IGNORECASE
|
||||||
)
|
)
|
||||||
|
|
||||||
def run(self, name, meta, source):
|
def run(self, name, meta, source):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Copyright (C) 2017 Mike Pennisi. All rights reserved.
|
// Copyright (C) 2017 Mike Pennisi. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
esid: use-strict-directive!@$&*()_+
|
esid: use-strict-directive!@$%&*()_+
|
||||||
description: Minimal test
|
description: Minimal test
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user