Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: native_client_sdk/src/doc/_sphinxext/chromesite_builder.py

Issue 438403003: [NaCl SDK Docs] Only generate one top-level <section> element. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/doc_generated/sdk/release-notes.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
diff --git a/native_client_sdk/src/doc/_sphinxext/chromesite_builder.py b/native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
index c44b3f757793e6eb070aa124bcacbd904e79662f..6c133bff417f65418146224ecdbbe160798fa4fd 100644
--- a/native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
+++ b/native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
@@ -103,11 +103,13 @@ class ChromesiteHTMLTranslator(HTMLTranslator):
def visit_section(self, node):
# chromesite needs <section> instead of <div class='section'>
self.section_level += 1
- self.body.append(self.starttag(node, 'section'))
+ if self.section_level == 1:
+ self.body.append(self.starttag(node, 'section'))
def depart_section(self, node):
+ if self.section_level == 1:
+ self.body.append('</section>')
self.section_level -= 1
- self.body.append('</section>')
def visit_image(self, node):
# Paths to images in .rst sources should be absolute. This visitor does the
« no previous file with comments | « native_client_sdk/doc_generated/sdk/release-notes.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698