fix detection when tag exists more than once

This commit is contained in:
Andreas Preikschat 2011-09-20 17:50:43 +02:00
parent 240d612948
commit 920a65b4e1

View File

@ -462,8 +462,8 @@ class Renderer(object):
for tag in FormattingTags.get_html_tags(): for tag in FormattingTags.get_html_tags():
if tag[u'start tag'] == u'{br}': if tag[u'start tag'] == u'{br}':
continue continue
if tag[u'start tag'] in raw_text and not \ if raw_text.count(tag[u'start tag']) != \
tag[u'end tag'] in raw_text: raw_text.count(tag[u'end tag']):
raw_tags.append( raw_tags.append(
(raw_text.find(tag[u'start tag']), tag[u'start tag'], (raw_text.find(tag[u'start tag']), tag[u'start tag'],
tag[u'end tag'])) tag[u'end tag']))