mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
c5f95e08b7
commit
0d810cc05d
@ -116,7 +116,7 @@ def find_closest_containing_tag(block, offset, max_tags=sys.maxint):
|
|||||||
def find_tag_definition(block, offset):
|
def find_tag_definition(block, offset):
|
||||||
''' Return the <tag | > definition, if any that (block, offset) is inside. '''
|
''' Return the <tag | > definition, if any that (block, offset) is inside. '''
|
||||||
block, boundary = next_tag_boundary(block, offset, forward=False)
|
block, boundary = next_tag_boundary(block, offset, forward=False)
|
||||||
if not boundary.is_start:
|
if not boundary or not boundary.is_start:
|
||||||
return None, False
|
return None, False
|
||||||
tag_start = boundary
|
tag_start = boundary
|
||||||
closing = tag_start.closing
|
closing = tag_start.closing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user