annotate-snippets-rs icon indicating copy to clipboard operation
annotate-snippets-rs copied to clipboard

Library for snippet annotations

Results 58 annotate-snippets-rs issues
Sort by recently updated
recently updated
newest added

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:...

help wanted

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.

help wanted
good first issue

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...

C-enhancement

Here some example `Slice` where `t` symbol in `source` code have one space behind: ![image](https://user-images.githubusercontent.com/40376451/72680804-e5752880-3adf-11ea-80c5-aa8d0809acde.png) That `Slice` give us that output: ![image](https://user-images.githubusercontent.com/40376451/72680825-1ead9880-3ae0-11ea-87ca-f7d7f3ed5b8e.png) Now i change space behind `t` from space...

C-bug