mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix bug when handling links.
This commit is contained in:
parent
fe9f40e4a6
commit
94a11a8c56
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user