Fix bug when handling links.

This commit is contained in:
John Schember 2009-11-28 08:08:06 -05:00
parent fe9f40e4a6
commit 94a11a8c56

View File

@ -214,13 +214,12 @@ class PML_HTMLizer(object):
def process_code_link(self, stream, pre=''): def process_code_link(self, stream, pre=''):
text = u'' text = u''
href = self.code_value(stream)
if pre:
href = '#%s-%s' % (pre, href)
if self.state['a'][0]: if self.state['a'][0]:
text = self.STATES_TAGS['a'][1] text = self.STATES_TAGS['a'][1]
else: else:
href = self.code_value(stream)
if pre:
href = '#%s-%s' % (pre, href)
text = self.STATES_TAGS['a'][0] % href text = self.STATES_TAGS['a'][0] % href
self.state['a'][1] = href self.state['a'][1] = href