Define `\menuselection and \accelerator macros to redefine the style of menuselection` roles.

This commit is contained in:
Takeshi KOMIYA
2016-02-23 14:38:34 +09:00
parent e8cbd5a750
commit cea81e7a70
4 changed files with 7 additions and 4 deletions

View File

@@ -103,13 +103,13 @@ def test_inline():
# interpolation of arrows in menuselection
yield (verify, ':menuselection:`a --> b`',
u'<p><span class="menuselection">a \N{TRIANGULAR BULLET} b</span></p>',
'\\emph{a \\(\\rightarrow\\) b}')
'\\menuselection{a \\(\\rightarrow\\) b}')
# interpolation of ampersands in guilabel/menuselection
yield (verify, ':guilabel:`&Foo -&&- &Bar`',
u'<p><span class="guilabel"><span class="accelerator">F</span>oo '
'-&amp;- <span class="accelerator">B</span>ar</span></p>',
r'\emph{\underline{F}oo -\&- \underline{B}ar}')
r'\menuselection{\accelerator{F}oo -\&- \accelerator{B}ar}')
# non-interpolation of dashes in option role
yield (verify_re, ':option:`--with-option`',