summaryrefslogtreecommitdiff
path: root/sphinx/builders/html/transforms.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-12-30 21:12:00 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-12-30 21:12:00 +0900
commit6a53c53d538202bf58ae1d2f4922a8fd0b5290e8 (patch)
tree6c11c05b109aa48a13632bac1c07d56d2f9c7e91 /sphinx/builders/html/transforms.py
parent21698c14461d27933864d73e6fba568a154e83b3 (diff)
downloadsphinx-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.py2
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"])