diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 02:11:27 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 02:11:27 +0000 |
commit | a188c82ea0c4f25d99ed445b0b36aac0d9cf9121 (patch) | |
tree | 46a2735d9791608a5cdccae685b3f5873f8cbb84 /chrome/common/extensions/docs/server2/document_parser.py | |
parent | abcefa3eed579940f110161115029ee67df7a9fc (diff) | |
download | chromium_src-a188c82ea0c4f25d99ed445b0b36aac0d9cf9121.zip chromium_src-a188c82ea0c4f25d99ed445b0b36aac0d9cf9121.tar.gz chromium_src-a188c82ea0c4f25d99ed445b0b36aac0d9cf9121.tar.bz2 |
Docserver: Include <h4> tags in the table of contents, it's needed for the API
reference. Note that until the whole of bug 325555 is fixed the API reference
will still look wonky, and in fact this makes it look even wonkier.
BUG=325555
R=yoz@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/103413002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/server2/document_parser.py')
-rw-r--r-- | chrome/common/extensions/docs/server2/document_parser.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/common/extensions/docs/server2/document_parser.py b/chrome/common/extensions/docs/server2/document_parser.py index 1bbc0a8..b44c743 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) |