Skip to content

Commit 60ee3ed

Browse files
committed
wasm json source
1 parent ab38c50 commit 60ee3ed

File tree

1 file changed

+3
-2
lines changed
  • crates/wasm-qmd-parser/src

1 file changed

+3
-2
lines changed

crates/wasm-qmd-parser/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ fn pandoc_to_qmd(doc: &quarto_markdown_pandoc::pandoc::Pandoc) -> Result<String,
8383
}
8484

8585
#[wasm_bindgen]
86-
pub fn parse_qmd(input: JsValue) -> JsValue {
86+
pub fn parse_qmd(input: JsValue, include_resolved_locations: JsValue) -> JsValue {
8787
let input = as_string(&input, "input");
88-
let json = wasm_entry_points::parse_qmd(input.as_bytes());
88+
let include_resolved_locations = as_string(&include_resolved_locations, "input") == "true";
89+
let json = wasm_entry_points::parse_qmd(input.as_bytes(), include_resolved_locations);
8990
JsValue::from_str(&json)
9091
}
9192

0 commit comments

Comments
 (0)