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

Unified Diff: chrome/common/extensions/docs/server2/document_parser.py

Issue 103413002: Docserver: Include <h4> tags in the table of contents, it's needed for the API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: chrome/common/extensions/docs/server2/document_parser.py
diff --git a/chrome/common/extensions/docs/server2/document_parser.py b/chrome/common/extensions/docs/server2/document_parser.py
index 1bbc0a87a8c60e1fba41892caf71664a83f9db0e..b44c743e8cfa854c05fbaec74f2d0a8233020e00 100644
--- a/chrome/common/extensions/docs/server2/document_parser.py
+++ b/chrome/common/extensions/docs/server2/document_parser.py
@@ -93,7 +93,7 @@ def RemoveTitle(document):
return (document[:title_start] + document[title_end + 4:], None)
-_HEADER_TAGS = ['h2', 'h3']
+_HEADER_TAGS = ['h2', 'h3', 'h4']
class _DocumentParser(HTMLParser):
@@ -139,8 +139,10 @@ class _DocumentParser(HTMLParser):
belongs_to = self._processing_section.structure
for header in _HEADER_TAGS[:_HEADER_TAGS.index(tag)]:
if len(belongs_to) == 0:
- self._WarnWithPosition('Found <%s> without any preceding <%s>' %
- (tag, header))
+ # TODO(kalman): Re-enable this warning once the reference pages have
+ # their references fixed.
+ #self._WarnWithPosition('Found <%s> without any preceding <%s>' %
+ # (tag, header))
break
belongs_to = belongs_to[-1].entries
belongs_to.append(self._processing_entry)
« no previous file with comments | « chrome/common/extensions/docs/server2/cron.yaml ('k') | chrome/common/extensions/docs/server2/document_parser_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698