Expose SnippetGenerator.set_max_num_chars() so changing the default is possible (#323)
Co-authored-by: Erlend Simonsen <erlend.simonsen@gmail.com>master
parent
4df19aae75
commit
bb17328f2d
|
@ -80,4 +80,8 @@ impl SnippetGenerator {
|
||||||
let result = self.inner.snippet(&text);
|
let result = self.inner.snippet(&text);
|
||||||
Snippet { inner: result }
|
Snippet { inner: result }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn set_max_num_chars(&mut self, max_num_chars: usize) {
|
||||||
|
self.inner.set_max_num_chars(max_num_chars);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,3 +433,6 @@ class SnippetGenerator:
|
||||||
|
|
||||||
def snippet_from_doc(self, doc: Document) -> Snippet:
|
def snippet_from_doc(self, doc: Document) -> Snippet:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def set_max_num_chars(self, max_num_chars: int) -> None:
|
||||||
|
pass
|
Loading…
Reference in New Issue