From a5b9a35c508838197b26b746b731b67ac2b1a39d Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Mon, 22 Aug 2022 14:39:16 +0200 Subject: [PATCH] Activate char_map for highlighting --- http-ui/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index c20210443..3b14889cc 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -784,8 +784,10 @@ async fn main() -> anyhow::Result<()> { None => fields_ids_map.iter().map(|(_, name)| name).map(String::from).collect(), }; - let mut matcher_builder = - MatcherBuilder::new(matching_words, TokenizerBuilder::default().build()); + let mut matcher_builder = MatcherBuilder::new( + matching_words, + TokenizerBuilder::default().create_char_map(true).build(), + ); matcher_builder.highlight_prefix("".to_string()); matcher_builder.highlight_suffix("".to_string()); let highlighter = Highlighter::new(matcher_builder);