Expose SnippetGenerator.set_max_num_chars() so changing the default is possible (#323)

Co-authored-by: Erlend Simonsen <erlend.simonsen@gmail.com>
master
Erlend Simonsen 2024-08-08 12:36:04 +02:00 committed by GitHub
parent 4df19aae75
commit bb17328f2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -80,4 +80,8 @@ impl SnippetGenerator {
let result = self.inner.snippet(&text);
Snippet { inner: result }
}
pub fn set_max_num_chars(&mut self, max_num_chars: usize) {
self.inner.set_max_num_chars(max_num_chars);
}
}

View File

@ -433,3 +433,6 @@ class SnippetGenerator:
def snippet_from_doc(self, doc: Document) -> Snippet:
pass
def set_max_num_chars(self, max_num_chars: int) -> None:
pass