diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-25 01:43:23 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-29 23:55:56 +0900 |
commit | 7aa5584a47d269aa656a4d8a296aa56e2c69dc6c (patch) | |
tree | 8a67d3c0d4afc882b85331f75ba275b334209e85 /sphinx | |
parent | 70c61e44c34b4dadf1a7552be7c5feabd74b98bc (diff) | |
download | sphinx-git-7aa5584a47d269aa656a4d8a296aa56e2c69dc6c.tar.gz |
Fix #7301: capital characters are not allowed for node_id
Diffstat (limited to 'sphinx')
-rw-r--r-- | sphinx/util/nodes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index b39a7ca01..bca6e0bfc 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -445,6 +445,7 @@ def _make_id(string: str) -> str: Changes: + * Allow to use capital alphabet characters * Allow to use dots (".") and underscores ("_") for an identifier without a leading character. @@ -452,8 +453,7 @@ def _make_id(string: str) -> str: # Maintainer: docutils-develop@lists.sourceforge.net # Copyright: This module has been placed in the public domain. """ - id = string.lower() - id = id.translate(_non_id_translate_digraphs) + id = string.translate(_non_id_translate_digraphs) id = id.translate(_non_id_translate) # get rid of non-ascii characters. # 'ascii' lowercase to prevent problems with turkish locale. @@ -464,7 +464,7 @@ def _make_id(string: str) -> str: return str(id) -_non_id_chars = re.compile('[^a-z0-9._]+') +_non_id_chars = re.compile('[^a-zA-Z0-9._]+') _non_id_at_ends = re.compile('^[-0-9._]+|-+$') _non_id_translate = { 0x00f8: u'o', # o with stroke |