Skip to content

Error from Snippet to DisplayList #26

Closed
@zzau13

Description

@zzau13

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions