diff options
author | 2025-01-31 20:42:53 +0100 | |
---|---|---|
committer | 2025-01-31 20:42:53 +0100 | |
commit | bc2d662af7fd9b527dc6b49f31627780e58d79c2 (patch) | |
tree | 36124616067140d459ff6877e3ebd2855f7f3ae0 /widget | |
parent | 4b8fc23840e52a81f1c62c48e4e83d04b700b392 (diff) | |
download | iced-bc2d662af7fd9b527dc6b49f31627780e58d79c2.tar.gz iced-bc2d662af7fd9b527dc6b49f31627780e58d79c2.tar.bz2 iced-bc2d662af7fd9b527dc6b49f31627780e58d79c2.zip |
Replace `println` with `log` calls in `markdown` module
Diffstat (limited to 'widget')
-rw-r--r-- | widget/Cargo.toml | 1 | ||||
-rw-r--r-- | widget/src/markdown.rs | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/widget/Cargo.toml b/widget/Cargo.toml index e19cad08..6d1f054e 100644 --- a/widget/Cargo.toml +++ b/widget/Cargo.toml @@ -33,6 +33,7 @@ iced_renderer.workspace = true iced_runtime.workspace = true num-traits.workspace = true +log.workspace = true rustc-hash.workspace = true thiserror.workspace = true unicode-segmentation.workspace = true diff --git a/widget/src/markdown.rs b/widget/src/markdown.rs index 7f6965e5..77a560ec 100644 --- a/widget/src/markdown.rs +++ b/widget/src/markdown.rs @@ -313,18 +313,22 @@ impl Highlighter { Some(line) if line.0 == text => {} _ => { if self.current + 1 < self.lines.len() { - println!("Resetting..."); + log::debug!("Resetting highlighter..."); self.parser.reset(); self.lines.truncate(self.current); for line in &self.lines { - println!("Refeeding {n} lines", n = self.lines.len()); + log::debug!( + "Refeeding {n} lines", + n = self.lines.len() + ); let _ = self.parser.highlight_line(&line.0); } } - println!("Parsing: {text}", text = text.trim_end()); + log::trace!("Parsing: {text}", text = text.trim_end()); + if self.current + 1 < self.lines.len() { self.parser.commit(); } |