annotate-snippets-rs
                                
                                 annotate-snippets-rs copied to clipboard
                                
                                    annotate-snippets-rs copied to clipboard
                            
                            
                            
                        Library for snippet annotations
The starlark-rust library uses this code, specifically at https://github.com/facebookexperimental/starlark-rust/blob/13bec61a44dd2ec268403e1d6da4401ea76a3f12/starlark/src/errors/mod.rs#L205-L219. The relevant fragment is: ```rust let snippet = Snippet { title: Some(Annotation { label: Some(annotation_label), id: None, annotation_type: AnnotationType::Error, }), footer:...
When rendering an annotation with `fold: true` the first 4 lines get rendered if the source has more than 7 lines. If the source has 7 or less lines, the...
This pr changes the `format_header` function to use the line number that is already stored in `DisplayLine` instead of (wrongly) recomputing it. Fixes #52
In #53 I reported the issue that `__` in titles gets parsed specially. This feature isn't documented anywhere, and doing a bit of git archaeology, I get lost 4 years...
Here is a test case demonstrating the issue: ```rs #[test] fn test_origin_line_numbers_with_fold() { let snippets = Snippet { title: Some(snippet::Annotation { id: None, label: Some("oops"), annotation_type: snippet::AnnotationType::Error, }), footer: vec![],...
Travis is falling apart, we need to switch to GH actions.
I'd like to have a function return a Snippet but `origin` is a `&str` and I have a `PathBuf`. I can convert it to a `Cow` but I wouldn't be...
At the layer I want to be creating `Snippet`s, I won't know whether colored formatting is appropriate or not. That seems like a concern for when converting into a `DisplayList`.
I am creating a tool that needs to report messages on the file itself and not a specific range within the file. I'd like these messages to be consistent with...
Here some example `Slice` where `t` symbol in `source` code have one space behind:  That `Slice` give us that output:  Now i change space behind `t` from space...