Skip to content

Decorator finder processes for a long time or inifinitely #295

@joas8211

Description

@joas8211

This regular expression seems to cause long processing times.

[/(`)([\s\S]*)+(?<!\\)(`){1}/i],

It seems unoptimized. If someone would care to explain what it should be doing then I could write better expression to replace it.
In my view, it tries to match template literals. Is that right?

Here's an example code that causes long / infinite processing:

'``/* Lorem ipsum Mandarine. */'.match(/(`)([\s\S]*)+(?<!\\)(`){1}/i)

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