Skip to content

Error from Snippet to DisplayList #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zzau13 opened this issue Mar 6, 2020 · 2 comments · Fixed by #27
Closed

Error from Snippet to DisplayList #26

zzau13 opened this issue Mar 6, 2020 · 2 comments · Fixed by #27

Comments

@zzau13
Copy link
Contributor

zzau13 commented Mar 6, 2020

I use this in yarte here.

With any error returns something similar to this:

DisplayList { body: [Raw(Annotation { annotation: Annotation { annotation_type: Error, id: None, label: [DisplayTextFragment { content: "", style: Emphasis }] }, source_aligned: false, continuation: false }), Raw(Origin { path: "templates/deep/more/card/hi.hbs", pos: Some((7, 21)), header_type: Initial }), Source { lineno: None, inline_marks: [], line: Empty }, Source { lineno: Some(7), inline_marks: [], line: Content { text: "<h1>Hi, {{ name }} {{ @lastname }}", range: (0, 35) } }, Source { lineno: None, inline_marks: [], 

// Label is empty
line: Annotation { 
    annotation: Annotation { 
       annotation_type: None, id: None, 
       label: [/* WHY IS EMPTY */] }, 

range: (21, 22), annotation_type: Error, annotation_part: MultilineStart } }, Source { lineno: None, inline_marks: [], line: Empty }] }

And as you can see the label has vanished

@zbraniecki
Copy link
Contributor

Thank you for the report! I'm a bit swamped lately but will try to find time to debug it! PRs welcomed!

@zzau13
Copy link
Contributor Author

zzau13 commented Mar 10, 2020

I'm already in it.

epage added a commit to epage/annotate-snippets-rs that referenced this issue Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants