Skip to content

Commit c14d78d

Browse files
committed
Fix non-exhaustive Inline match in loki-pdf text writer
Add FootnoteRef arm (empty string — PDF footnotes not yet implemented) to the two collect_text/space_width map sites in para.rs and renderer.rs. https://claude.ai/code/session_01MokDdUw2YPFTgD3ZsZ7Scn
1 parent 47f89a8 commit c14d78d

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src-tauri/formats/pdf/src/writer/text/para.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ fn collect_text(content: &[Inline]) -> String {
200200
.map(|i| match i {
201201
Inline::Text { text, .. } => text.as_str(),
202202
Inline::LineBreak => "\n",
203+
Inline::FootnoteRef { .. } => "",
203204
})
204205
.collect()
205206
}

src-tauri/formats/pdf/src/writer/text/renderer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ fn is_finished(
137137
.map(|i| match i {
138138
Inline::Text { text, .. } => text.as_str(),
139139
Inline::LineBreak => "\n",
140+
Inline::FootnoteRef { .. } => "",
140141
})
141142
.collect();
142143
let font_size = props.font_size;

0 commit comments

Comments
 (0)