Skip to content

Commit 4f41fa5

Browse files
author
Wliu
authored
Merge pull request atom#519 from pchaigno/avoid-ambiguous-h
Avoid using the ambiguous \h shorthand character
2 parents 14e02bd + c24bb4e commit 4f41fa5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

grammars/javascript.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@
15241524
'name': 'punctuation.definition.unicode-escape.end.bracket.curly.js'
15251525
}
15261526
{
1527-
'match': '\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
1527+
'match': '\\\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
15281528
'name': 'constant.character.escape.js'
15291529
}
15301530
]

grammars/regular expressions (javascript).cson

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'name': 'constant.character.character-class.regexp'
1515
}
1616
{
17-
'match': '\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)'
17+
'match': '\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})'
1818
'name': 'constant.character.numeric.regexp'
1919
}
2020
{
@@ -107,7 +107,7 @@
107107
'name': 'constant.character.control.regexp'
108108
'6':
109109
'name': 'constant.character.escape.backslash.regexp'
110-
'match': '(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))'
110+
'match': '(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))'
111111
'name': 'constant.other.character-class.range.regexp'
112112
}
113113
{

0 commit comments

Comments
 (0)