|
31 | 31 | }, |
32 | 32 | "patterns": [ |
33 | 33 | { "include": "#test" }, |
| 34 | + { "include": "#dot" }, |
| 35 | + { "include": "#anchor" }, |
34 | 36 | { "include": "#alternation" }, |
35 | 37 | { "include": "#quantifier" }, |
36 | 38 | { "include": "#character-class" }, |
|
158 | 160 | { "include": "#character-types" }, |
159 | 161 | { "include": "#character-types-2" }, |
160 | 162 | { "include": "#characters" }, |
161 | | - { "include": "#anchor" }, |
| 163 | + { "include": "#escaped-anchor" }, |
162 | 164 | { "include": "#subroutine" }, |
163 | 165 | { "include": "#backreference" }, |
164 | 166 | { "include": "#code-point" }, |
|
1623 | 1625 | ] |
1624 | 1626 | }, |
1625 | 1627 | "anchor": { |
1626 | | - "comment": "$ ^ \\A \\B \\b \\G \\K \\Y \\y \\Z \\z", |
1627 | | - "match": "(?>[$^]|\\\\{2}[ABbGKYyZz])([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", |
| 1628 | + "comment": "$ ^", |
| 1629 | + "match": "[$^]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", |
1628 | 1630 | "captures": { |
1629 | 1631 | "0": { "name": "variable.tm" }, |
1630 | | - "1": { "name": "invalid.illegal.tm markup.underline regex" } |
| 1632 | + "1": { "name": "invalid.illegal.tm regex" } |
| 1633 | + } |
| 1634 | + }, |
| 1635 | + "escaped-anchor": { |
| 1636 | + "comment": "\\A \\B \\b \\G \\K \\Y \\y \\Z \\z", |
| 1637 | + "match": "\\G\\\\{2}[ABbGKYyZz]([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", |
| 1638 | + "captures": { |
| 1639 | + "0": { "name": "variable.tm" }, |
| 1640 | + "1": { "name": "invalid.illegal.tm regex" } |
1631 | 1641 | } |
1632 | 1642 | }, |
1633 | 1643 | "alternation": { |
1634 | 1644 | "comment": "|", |
1635 | 1645 | "match": "\\|([+*?]|{(?>[0-9]+,?[0-9]*|,[0-9]+)})?", |
1636 | 1646 | "captures": { |
1637 | 1647 | "0": { "name": "keyword.control.tm" }, |
1638 | | - "1": { "name": "invalid.illegal.tm markup.underline regex" } |
| 1648 | + "1": { "name": "invalid.illegal.tm regex" } |
1639 | 1649 | } |
1640 | 1650 | }, |
1641 | 1651 | "character-types": { |
|
1644 | 1654 | "name": "variable.other.enummember.tm" |
1645 | 1655 | }, |
1646 | 1656 | "character-types-2": { |
1647 | | - "comment": "\\. \\N \\O \\R \\X cannot be used in character classes", |
1648 | | - "match": "\\.|\\\\{2}[NORX]", |
| 1657 | + "comment": "\\N \\O \\R \\X cannot be used in character classes", |
| 1658 | + "match": "\\G\\\\{2}[NORX]", |
1649 | 1659 | "name": "variable.other.enummember.tm" |
1650 | 1660 | }, |
1651 | 1661 | "characters": { |
1652 | 1662 | "comment": "\\a \\e \\f \\n \\r \\t \\v", |
1653 | 1663 | "match": "\\G\\\\{2}[aefnrtv]", |
1654 | 1664 | "name": "punctuation.definition.list.begin.markdown" |
1655 | 1665 | }, |
| 1666 | + "dot": { |
| 1667 | + "comment": "\\. cannot be used in character classes", |
| 1668 | + "match": "\\.", |
| 1669 | + "name": "variable.other.enummember.tm" |
| 1670 | + }, |
1656 | 1671 | "character-literal": { |
1657 | 1672 | "comment": "Match anything left over and all non-meta characters", |
1658 | 1673 | "match": ".[^\\x00-\\x1F\\x7F \"#$^.+*?|\\[{()\\\\]*", |
|
0 commit comments