mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Fix smart tag insert not working correctly if the selected text starts with the closing angle bracket of a tag
This commit is contained in:
parent
2feb109fba
commit
6f6bd4b32f
@ -275,7 +275,7 @@ def ensure_not_within_tag_definition(cursor, forward=True):
|
|||||||
if boundary.is_start:
|
if boundary.is_start:
|
||||||
# We are inside a tag
|
# We are inside a tag
|
||||||
if forward:
|
if forward:
|
||||||
block, boundary = next_tag_boundary(block, offset)
|
block, boundary = next_tag_boundary(block, max(0, offset-1))
|
||||||
if block is not None:
|
if block is not None:
|
||||||
cursor.setPosition(block.position() + boundary.offset + 1)
|
cursor.setPosition(block.position() + boundary.offset + 1)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user