This commit is contained in:
Kovid Goyal 2009-12-12 19:50:16 -07:00
parent 0adef17457
commit a944d488a0

View File

@ -48,10 +48,6 @@ TAG_LINKS = [
'a', 'a',
] ]
TAG_TITLE = [
'h1',
]
STYLES = [ STYLES = [
('font-weight', {'bold' : 'strong', 'bolder' : 'strong'}), ('font-weight', {'bold' : 'strong', 'bolder' : 'strong'}),
('font-style', {'italic' : 'emphasis'}), ('font-style', {'italic' : 'emphasis'}),
@ -255,17 +251,6 @@ class FB2MLizer(object):
fb2_text.append('<p>') fb2_text.append('<p>')
tags.append('p') tags.append('p')
'''if tag in TAG_TITLE:
if 'p' in tag_stack:
ctag = []
ctag.append(tag_stack.pop())
while ctag[-1] != 'p':
ctag.append(tag_stack.pop())
fb2_text += self.close_tags(ctag)
fb2_text.append('</section><section><title><p>')
tag_stack.append('title')
tag_stack.append('p')'''
fb2_tag = TAG_MAP.get(tag, None) fb2_tag = TAG_MAP.get(tag, None)
if fb2_tag and fb2_tag not in tag_stack+tags: if fb2_tag and fb2_tag not in tag_stack+tags:
fb2_text.append('<%s>' % fb2_tag) fb2_text.append('<%s>' % fb2_tag)