diff options
| author | ianb <devnull@localhost> | 2005-07-20 03:50:58 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-07-20 03:50:58 +0000 |
| commit | ec9e214c8d83c413699c049622b67d4f99295194 (patch) | |
| tree | 82c47a52db1f0959533e5fb82824aa14d991cf7d /paste | |
| parent | 9ac09b0fcbb9466a5bf7ecd6112c158225dd5d0e (diff) | |
| download | paste-ec9e214c8d83c413699c049622b67d4f99295194.tar.gz | |
Fixed regex to better match reST output
Diffstat (limited to 'paste')
| -rwxr-xr-x | paste/docsupport/gensite.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/paste/docsupport/gensite.py b/paste/docsupport/gensite.py index f8bebb9..c0c7023 100755 --- a/paste/docsupport/gensite.py +++ b/paste/docsupport/gensite.py @@ -105,8 +105,9 @@ class RestFile(object): print 'No title in %s' % self.filename props['title'] = '' - _start_re = re.compile(r'<div class=".*?" id="contents">') - _end_re = re.compile(r'</div>[ \n]*</div>[ \n]*</body>') + #_start_re = re.compile(r'<div class=".*?" id="contents">') + _start_re = re.compile(r'<body>[ \n]*(?:<div.*?>[ \n]*)?<h1.*?>.*?</h1>') + _end_re = re.compile(r'(?:</div>[ \n]*)?</div>[ \n]*</body>') _bad_res = [ (re.compile(r'<link rel="stylesheet".*?>'), ''), (re.compile(r'<h1 class="title">.*?</h1>'), ''), |
