Fix #8714: html: kbd role with "Caps Lock" rendered incorrectly

`:kbd:` role has to support keys in consist of multiple words (ex. caps
lock, num lock, etc.)
This commit is contained in:
Takeshi KOMIYA
2021-01-22 00:02:45 +09:00
parent d5d072bc3a
commit d6f41227d7
3 changed files with 32 additions and 3 deletions

View File

@@ -284,6 +284,13 @@ def get_verifier(verify, verify_re):
'<p><kbd class="kbd docutils literal notranslate">-</kbd></p>',
'\\sphinxkeyboard{\\sphinxupquote{\\sphinxhyphen{}}}',
),
(
# kbd role
'verify',
':kbd:`Caps Lock`',
'<p><kbd class="kbd docutils literal notranslate">Caps Lock</kbd></p>',
'\\sphinxkeyboard{\\sphinxupquote{Caps Lock}}',
),
(
# non-interpolation of dashes in option role
'verify_re',