Skip to content

Span.getLocationMessage returns incorrect output for lines without trailing newlines #19665

Closed
@nex3

Description

@nex3

If a span points to the final line in a file, and that line doesn't end in a newline, the arrows in getLocationMessage will be rendered on the same line as the source text. For example:

    Error on line 12, column 28 of pubspec.yaml: Error loading transformer: I hate these settings!
      - app/src/html_rewriter: {} ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.pkg-sourcemaps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions