Rename "underline" class to accelerator to preserve separation of semantics & presentation.

This commit is contained in:
tpowers 2010-04-27 20:09:11 -07:00
parent 52ba45f458
commit 0301dccdda
2 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
sphinx.roles sphinx.roles
@ -231,11 +232,11 @@ def menusel_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
textnode = nodes.Text(span) textnode = nodes.Text(span)
node += textnode node += textnode
continue continue
underline_node = nodes.inline() accel_node = nodes.inline()
letter_node = nodes.Text(span[0]) letter_node = nodes.Text(span[0])
underline_node += letter_node accel_node += letter_node
underline_node['classes'].append('underline') accel_node['classes'].append('accelerator')
node += underline_node node += accel_node
textnode = nodes.Text(span[1:]) textnode = nodes.Text(span[1:])
node += textnode node += textnode

View File

@ -400,7 +400,7 @@ dl.glossary dt {
font-weight: bold; font-weight: bold;
} }
.underline { .accelerator {
text-decoration: underline; text-decoration: underline;
} }