mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-18 18:25:00 +00:00
feat: support folding_range api
This commit is contained in:
parent
22a68003fc
commit
bc6e981e81
9 changed files with 405 additions and 243 deletions
|
@ -40,9 +40,11 @@ mod tests {
|
|||
use serde::Serialize;
|
||||
use serde_json::{ser::PrettyFormatter, Serializer, Value};
|
||||
use typst_ts_compiler::ShadowApiExt;
|
||||
pub use typst_ts_compiler::TypstSystemWorld;
|
||||
use typst_ts_core::{config::CompileOpts, Bytes};
|
||||
|
||||
pub use insta::assert_snapshot;
|
||||
pub use typst_ts_compiler::TypstSystemWorld;
|
||||
|
||||
pub fn run_with_source<T>(
|
||||
source: &str,
|
||||
f: impl FnOnce(&mut TypstSystemWorld, PathBuf) -> T,
|
||||
|
@ -73,6 +75,11 @@ mod tests {
|
|||
pub struct JsonRepr(Value);
|
||||
|
||||
impl JsonRepr {
|
||||
pub fn new_pure(v: impl serde::Serialize) -> Self {
|
||||
let s = serde_json::to_value(v).unwrap();
|
||||
Self(s)
|
||||
}
|
||||
|
||||
// pub fn new(v: impl serde::Serialize) -> Self {
|
||||
// let s = serde_json::to_value(v).unwrap();
|
||||
// Self(REDACT_URI.redact(s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue