mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1323: Fix emitting empty `<ul>
` tags in the HTML writer, which is not valid HTML.
This commit is contained in:
parent
ce49286240
commit
7a74fe81b1
3
CHANGES
3
CHANGES
@ -119,6 +119,9 @@ Bugs fixed
|
||||
* #1330: Fix :confval:`exclude_patterns` behavior with subdirectories in the
|
||||
:confval:`html_static_path`.
|
||||
|
||||
* #1323: Fix emitting empty ``<ul>`` tags in the HTML writer, which is not
|
||||
valid HTML.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
@ -240,6 +240,12 @@ class HTMLTranslator(BaseTranslator):
|
||||
self.body.append('.'.join(map(str, numbers)) +
|
||||
self.secnumber_suffix)
|
||||
|
||||
# overwritten to avoid emitting empty <ul></ul>
|
||||
def visit_bullet_list(self, node):
|
||||
if len(node) == 1 and node[0].tagname == 'toctree':
|
||||
raise nodes.SkipNode
|
||||
BaseTranslator.visit_bullet_list(self, node)
|
||||
|
||||
# overwritten
|
||||
def visit_title(self, node):
|
||||
BaseTranslator.visit_title(self, node)
|
||||
|
Loading…
Reference in New Issue
Block a user