Skip to content

Commit 637357c

Browse files
artizclaude
andcommitted
wasm scan: keep page_count/finish exported after the add_page split
Splitting add_page into a #[wasm_bindgen] wrapper pair plus a plain add_page_impl left page_count and finish inside the non-wasm_bindgen impl block, so they stopped being exported to JS ("cur.conv.finish is not a function"). Close the plain impl right after add_page_impl and put page_count/finish back in a #[wasm_bindgen] impl block. Refs #157 Signed-off-by: artiz <artem.kustikov@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT
1 parent 4d2199f commit 637357c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

crates/docling-wasm/src/scanned.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ impl ScannedConverter {
210210
.push(assemble_page_with_tables(&page, regions, table_rows));
211211
Ok(())
212212
}
213+
}
213214

215+
#[wasm_bindgen]
216+
impl ScannedConverter {
214217
/// Number of pages converted so far (progress display).
215218
pub fn page_count(&self) -> usize {
216219
self.pages.len()

0 commit comments

Comments
 (0)