mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-23 11:17:13 +00:00
bindings: the footnote signal, which book-pipeline still had its own copy of
`looks_like_footnote_citations` is the function chunkmd's `looks_like_citations` was ported from, and book-pipeline was still running the Python original at four call sites. Bound on all four surfaces so it can stop. Checked against the Python over 34,458 chunks of the live corpus: no disagreement.
This commit is contained in:
@@ -305,6 +305,12 @@ pub fn identify(name: &str, data: &[u8]) -> Result<JsValue, JsValue> {
|
||||
to_js(&crate::identify(name, data))
|
||||
}
|
||||
|
||||
/// Whether a chunk of body text carries footnote or endnote citations.
|
||||
#[wasm_bindgen(js_name = looksLikeFootnoteCitations)]
|
||||
pub fn looks_like_footnote_citations(text: &str) -> bool {
|
||||
crate::looks_like_footnote_citations(text)
|
||||
}
|
||||
|
||||
/// Read the references out of a bibliography or a page of notes.
|
||||
#[wasm_bindgen(js_name = findCitations, skip_typescript)]
|
||||
pub fn find_citations(text: &str) -> Result<JsValue, JsValue> {
|
||||
|
||||
Reference in New Issue
Block a user