Index: chrome/common/extensions/docs/server2/intro_data_source.py |
diff --git a/chrome/common/extensions/docs/server2/intro_data_source.py b/chrome/common/extensions/docs/server2/intro_data_source.py |
index 83d8a2f49afa5f7ca318f2099a5c77bbdbcf525e..a87298bc313cd8e664c6b3afc930243728d7beeb 100644 |
--- a/chrome/common/extensions/docs/server2/intro_data_source.py |
+++ b/chrome/common/extensions/docs/server2/intro_data_source.py |
@@ -2,9 +2,8 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-import logging |
- |
from HTMLParser import HTMLParser |
+import re |
from docs_server_utils import FormatKey |
from third_party.handlebar import Handlebar |
@@ -62,6 +61,10 @@ class IntroDataSource(object): |
def _MakeIntroDict(self, intro): |
parser = _IntroParser() |
parser.feed(intro) |
+ intro = re.sub(re.compile('<h1[^>.]*?>.*?</h1>', flags=re.DOTALL), |
cduvall
2012/08/02 00:54:06
Used re here because there's not an easy way to re
|
+ '', |
+ intro, |
+ count=1) |
return { |
'intro': Handlebar(intro), |
'toc': parser.toc, |