Skip to content

Commit fb4a1ec

Browse files
committed
Fix code scanning alert - Overly permissive regular expression range #89
1 parent 5de6912 commit fb4a1ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

robotcode/language_server/robotframework/parts/semantic_tokens.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def mapping(cls) -> Dict[str, Tuple[Enum, Optional[Set[Enum]]]]:
241241
return cls.__mapping
242242

243243
ESCAPE_REGEX = re.compile(
244-
r"(?P<t>[^\\]+)|(?P<x>\\([^xuU]|x[0-f]{2}|u[0-f]{4}|U[0-f]{8}){0,1})", re.MULTILINE | re.DOTALL
244+
r"(?P<t>[^\\]+)|(?P<x>\\([^xuU]|x[0-0a-f]{2}|u[0-9a-f]{4}|U[0-9a-f]{8}){0,1})", re.MULTILINE | re.DOTALL
245245
)
246246
BDD_TOKEN_REGEX = re.compile(r"^(Given|When|Then|And|But)\s", flags=re.IGNORECASE)
247247

0 commit comments

Comments
 (0)