Skip to content

New import regex matches incorrectly #91

@imagentleman

Description

@imagentleman

The recent regex change on version 2.5.6 in this line:

https://github.com/riot/compiler/blob/master/src/core.js#L133

Matches text incorrectly. It matches from the word "import" to the last single or double quote on the entire tag, not to the end of the import.

Example:

https://regex101.com/r/Isww62/1

Previous regex behavior:

https://regex101.com/r/Isww62/2

This problem breaks any tag with ES6 imports inside.

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