fixed issue where last word was counted for spacing
All checks were successful
Python CI / test (3.10) (push) Successful in 2m17s
Python CI / test (3.12) (push) Successful in 2m6s
Python CI / test (3.13) (push) Successful in 2m1s

This commit is contained in:
Duncan Tourolle 2025-11-10 15:22:18 +01:00
parent 8e720d4037
commit 41dc904755
2 changed files with 4 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

@ -644,7 +644,10 @@ class Line(Box):
# Render with next text information for continuous underline/strikethrough
text.render(next_text, self._spacing_render)
x_cursor += self._spacing_render + text.width # x-spacing + width of text object
# Add text width, then spacing only if there are more words
x_cursor += text.width
if i < len(self._text_objects) - 1:
x_cursor += self._spacing_render
def query_point(self, point: Tuple[int, int]) -> Optional['QueryResult']:
"""