RegExp: completion for horizontal and vertical whitespace escape sequences

This commit is contained in:
Bas Leijdekkers
2014-10-22 10:55:50 +02:00
parent fc75245758
commit 8d4fc53598
2 changed files with 5 additions and 1 deletions
@@ -89,8 +89,12 @@ public final class DefaultRegExpPropertiesProvider {
private final String[][] myCharacterClasses = {
{"d", "digit: [0-9]"},
{"D", "nondigit: [^0-9]"},
{"h", "horizontal whitespace character: [ \\t\\xA0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000]"},
{"H", "non-horizontal whitespace character: [^\\h]"},
{"s", "whitespace [ \\t\\n\\x0B\\f\\r]"},
{"S", "non-whitespace [^\\s]"},
{"v", "vertical whitespace character: [\\n\\x0B\\f\\r\\x85\\u2028\\u2029]"},
{"V", "non-vertical whitespace character: [^\\v]"},
{"w", "word character [a-zA-Z_0-9]"},
{"W", "nonword character [^\\w]"},
{"b", "word boundary"},
@@ -58,7 +58,7 @@ public class RegExpCompletionTest extends CodeInsightFixtureTestCase {
private void doBackSlashVariantsTest() throws Throwable {
java.util.List<String> nameList = new ArrayList<String>(Arrays.asList("d", "D", "s", "S", "w", "W", "b", "B", "A", "G", "Z", "z", "Q", "E",
"t", "n", "r", "f", "a", "e"));
"t", "n", "r", "f", "a", "e", "h", "H", "v", "V"));
for (String[] stringArray : DefaultRegExpPropertiesProvider.getInstance().getAllKnownProperties()) {
nameList.add("p{" + stringArray[0] + "}");
}