mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Update cpp domain identifier regex to match destructors
Previously the regex would fail to match c++ destructors, as the presence of a "~" would mean that the "\b" would no longer match the start of a word. Now we try to find the optional "~" first then continue with the word as normal.
This commit is contained in:
parent
ffd9268a65
commit
d04182b85c
@ -23,7 +23,7 @@ from sphinx.util.nodes import make_refnode
|
||||
from sphinx.util.compat import Directive
|
||||
|
||||
|
||||
_identifier_re = re.compile(r'\b(~?[a-zA-Z_][a-zA-Z0-9_]*)\b')
|
||||
_identifier_re = re.compile(r'(~?\b[a-zA-Z_][a-zA-Z0-9_]*)\b')
|
||||
_whitespace_re = re.compile(r'\s+(?u)')
|
||||
_string_re = re.compile(r"[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'"
|
||||
r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
|
||||
|
Loading…
Reference in New Issue
Block a user