Strip invisible Unicode chars and expand ligatures on ActualText path
Soft hyphens, zero-width spaces, BOM, ZWNJ/ZWJ, and word joiners now get stripped in expand_ligatures(). Also call expand_ligatures() on the ActualText code path which was the only TextItem creation site missing it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
93c5c21384
commit
1afc1fdaa2
@@ -594,7 +594,7 @@ pub(crate) fn extract_page_text_items(
|
||||
.map(|s| s.as_str())
|
||||
.unwrap_or(¤t_font);
|
||||
items.push(TextItem {
|
||||
text: at,
|
||||
text: expand_ligatures(&at),
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
|
||||
Reference in New Issue
Block a user