@@ -124,7 +124,7 @@ class ChapterNavigator:
|
||||
def _extract_heading_text(self, heading: Heading) -> str:
|
||||
"""Extract text content from a heading block"""
|
||||
words = []
|
||||
for word in heading.words():
|
||||
for position, word in heading.words_iter():
|
||||
if isinstance(word, Word):
|
||||
words.append(word.text)
|
||||
return " ".join(words)
|
||||
@@ -288,7 +288,7 @@ class BidirectionalLayouter:
|
||||
# In practice, we'd need to handle each block type appropriately
|
||||
if isinstance(block, Paragraph):
|
||||
scaled_block = Paragraph(FontScaler.scale_font(block.style, font_scale))
|
||||
for word in block.words():
|
||||
for word in block.words_iter():
|
||||
if isinstance(word, Word):
|
||||
scaled_word = Word(word.text, FontScaler.scale_font(word.style, font_scale))
|
||||
scaled_block.add_word(scaled_word)
|
||||
|
||||
Reference in New Issue
Block a user