diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-30 21:12:00 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-30 21:12:00 +0900 |
commit | 6a53c53d538202bf58ae1d2f4922a8fd0b5290e8 (patch) | |
tree | 6c11c05b109aa48a13632bac1c07d56d2f9c7e91 /sphinx/builders/html/transforms.py | |
parent | 21698c14461d27933864d73e6fba568a154e83b3 (diff) | |
download | sphinx-git-6a53c53d538202bf58ae1d2f4922a8fd0b5290e8.tar.gz |
Fix #8618: html: incorrect HTML for single compound-kdb separators
Diffstat (limited to 'sphinx/builders/html/transforms.py')
-rw-r--r-- | sphinx/builders/html/transforms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/builders/html/transforms.py b/sphinx/builders/html/transforms.py index c91da57e9..311b1b7a0 100644 --- a/sphinx/builders/html/transforms.py +++ b/sphinx/builders/html/transforms.py @@ -37,7 +37,7 @@ class KeyboardTransform(SphinxPostTransform): """ default_priority = 400 builders = ('html',) - pattern = re.compile(r'(-|\+|\^|\s+)') + pattern = re.compile(r'(?<=.)(-|\+|\^|\s+)(?=.)') def run(self, **kwargs: Any) -> None: matcher = NodeMatcher(nodes.literal, classes=["kbd"]) |