summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docutils/docutils/writers/html4css1.py3
-rw-r--r--docutils/test/functional/expected/standalone_rst_html4css1.html4
2 files changed, 4 insertions, 3 deletions
diff --git a/docutils/docutils/writers/html4css1.py b/docutils/docutils/writers/html4css1.py
index 5a2ab266a..b3a0ebd2e 100644
--- a/docutils/docutils/writers/html4css1.py
+++ b/docutils/docutils/writers/html4css1.py
@@ -1084,6 +1084,7 @@ class HTMLTranslator(nodes.NodeVisitor):
def visit_sidebar(self, node):
self.body.append(self.starttag(node, 'div', CLASS='sidebar'))
+ self.set_first_last(node)
self.in_sidebar = 1
def depart_sidebar(self, node):
@@ -1250,7 +1251,7 @@ class HTMLTranslator(nodes.NodeVisitor):
check_id = 1
elif isinstance(node.parent, nodes.sidebar):
self.body.append(
- self.starttag(node, 'p', '', CLASS='sidebar-title first'))
+ self.starttag(node, 'p', '', CLASS='sidebar-title'))
check_id = 1
elif isinstance(node.parent, nodes.Admonition):
self.body.append(
diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html
index 9cf3d3e84..f8c74775b 100644
--- a/docutils/test/functional/expected/standalone_rst_html4css1.html
+++ b/docutils/test/functional/expected/standalone_rst_html4css1.html
@@ -612,12 +612,12 @@ Reader discretion is strongly advised.</p>
<div class="section" id="topics-sidebars-and-rubrics">
<h3><a class="toc-backref" href="#id62" name="topics-sidebars-and-rubrics">2.14.4&nbsp;&nbsp;&nbsp;Topics, Sidebars, and Rubrics</a></h3>
<div class="sidebar">
-<p class="sidebar-title first">Sidebar Title</p>
+<p class="first sidebar-title">Sidebar Title</p>
<p class="sidebar-subtitle">Optional Subtitle</p>
<p>This is a sidebar. It is for text outside the flow of the main
text.</p>
<p class="rubric">This is a rubric inside a sidebar</p>
-<p>Sidebars often appears beside the main text with a border and
+<p class="last">Sidebars often appears beside the main text with a border and
background color.</p>
</div>
<div class="topic">