Draft Highlighter API

This commit is contained in:
Héctor Ramón Jiménez 2023-09-17 15:29:14 +02:00
parent 723111bb0d
commit 76dc82e8e8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
10 changed files with 218 additions and 19 deletions

View file

@ -149,6 +149,17 @@ impl text::Editor for () {
_new_font: Self::Font,
_new_size: Pixels,
_new_line_height: text::LineHeight,
_new_highlighter: &mut impl text::Highlighter,
) {
}
fn highlight<H: text::Highlighter>(
&mut self,
_font: Self::Font,
_highlighter: &mut H,
_format_highlight: impl Fn(
&H::Highlight,
) -> text::highlighter::Format<Self::Font>,
) {
}
}