From 368e4b1bd1a1516f69ce01b8a9bf5fd897fbab9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alja=C5=BE=20Mur=20Er=C5=BEen?= Date: Tue, 7 Feb 2023 13:35:17 +0100 Subject: [PATCH] fix --- prql-compiler/prqlc/src/jinja.rs | 7 +++++-- prql-compiler/prqlc/src/main.rs | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/prql-compiler/prqlc/src/jinja.rs b/prql-compiler/prqlc/src/jinja.rs index 90b9883889a7..c4f56a664854 100644 --- a/prql-compiler/prqlc/src/jinja.rs +++ b/prql-compiler/prqlc/src/jinja.rs @@ -91,7 +91,10 @@ fn find_span(source: &str, spans: Vec) -> &str { let end = spans.last().unwrap(); let mut start_index = 0; - let mut end_index = 0; + let mut end_index = source.len(); + + dbg!(source); + dbg!(end); let mut line = 1; let mut col = 0; @@ -161,7 +164,7 @@ mod test { Span { start_line: 7893648, start_col: 79678, - end_line: 2, + end_line: 3, end_col: 31, } ] diff --git a/prql-compiler/prqlc/src/main.rs b/prql-compiler/prqlc/src/main.rs index a85456aa17cd..0a3e3d6edc14 100644 --- a/prql-compiler/prqlc/src/main.rs +++ b/prql-compiler/prqlc/src/main.rs @@ -7,9 +7,9 @@ #[cfg(not(target_family = "wasm"))] mod cli; #[cfg(not(target_family = "wasm"))] -mod watch; -#[cfg(not(target_family = "wasm"))] mod jinja; +#[cfg(not(target_family = "wasm"))] +mod watch; #[cfg(not(target_family = "wasm"))] fn main() -> color_eyre::eyre::Result<()> {