|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -import regex as re |
6 | 5 | from copy import deepcopy |
7 | 6 | from typing import TYPE_CHECKING |
8 | 7 |
|
| 8 | +import regex as re |
9 | 9 | from docutils import nodes |
10 | 10 |
|
11 | 11 | from sphinx import addnodes |
|
27 | 27 | anon_identifier_re = re.compile(r'(@[a-zA-Z0-9_])[a-zA-Z0-9_]*\b') |
28 | 28 | identifier_re = re.compile( |
29 | 29 | r""" |
30 | | - ( # This 'extends' _anon_identifier_re with the ordinary identifiers, |
31 | | - # make sure they are in sync. |
32 | | - (~?\b[a-zA-Z_]) # ordinary identifiers |
33 | | - | \p{XID_Start} # Unicode-allowed starting characters for identifiers |
34 | | - | \p{ID_Compat_Math_Start} # Unicode-allowed starting mathematical characters for identifiers |
35 | | - | (@[a-zA-Z0-9_]) # our extension for names of anonymous entities |
| 30 | + ( # This 'extends' _anon_identifier_re with the ordinary identifiers, |
| 31 | + # make sure they are in sync. |
| 32 | + (~?\b[a-zA-Z_]) # ordinary identifiers |
| 33 | + | \p{XID_Start} # Unicode-allowed starting characters for identifiers |
| 34 | + | \p{ID_Compat_Math_Start} # Unicode-allowed starting math characters for identifiers |
| 35 | + | (@[a-zA-Z0-9_]) # our extension for names of anonymous entities |
36 | 36 | ) |
37 | 37 | ( |
38 | | - [a-zA-Z0-9_] # ordinary identifiers |
39 | | - | \p{XID_Continue} # Unicode-allowed continuing characters for identifiers |
40 | | - | \p{ID_Compat_Math_Continue} # Unicode-allowed continuing mathematical characters for identifiers |
| 38 | + [a-zA-Z0-9_] # ordinary identifiers |
| 39 | + | \p{XID_Continue} # Unicode-allowed continuing characters for identifiers |
| 40 | + | \p{ID_Compat_Math_Continue} # Unicode-allowed continuing math characters for identifiers |
41 | 41 | )* |
42 | 42 | """, |
43 | 43 | flags=re.VERBOSE, |
|
0 commit comments