code-span

Add additional infomation to code character

4 releases (2 breaking)

0.2.0 Dec 1, 2022
0.1.1 Nov 30, 2022
0.1.0 Nov 30, 2022
0.0.0 Nov 30, 2022


Used in color-span

MPL-2.0 license

9KB
149 lines

Code Span

Add additional information to your code spans.

fn main() {
    use code_span::CodeView;
    let mut view = CodeView::blank("public static class MyClass {}");
    view.mark_offset(0, 6, Some("keyword"));
    view.mark_offset(7, 13, Some("keyword"));
}

Dependencies

~0.3–1MB
~21K SLoC