Use new matcher in http-ui

This commit is contained in:
ManyTheFish
2022-03-30 10:50:23 +02:00
parent 734d0899d3
commit 29c5f76d7f
3 changed files with 26 additions and 29 deletions

View File

@ -34,6 +34,16 @@ impl MatcherBuilder {
}
}
pub fn from_matching_words(matching_words: MatchingWords) -> Self {
Self {
matching_words,
crop_size: DEFAULT_CROP_SIZE,
crop_marker: None,
highlight_prefix: None,
highlight_suffix: None,
}
}
pub fn crop_size(&mut self, word_count: usize) -> &Self {
self.crop_size = word_count;
self