Skip to content

Leaflet's regular expressions with */ break lazy evaluation with multi line comments #1288

@kristerkari

Description

@kristerkari

Hi,

I would like to lazy evaluate Leaflet's javascript inside a mobile web app to boost parsing performance. source 1 source 2

Since I'm using a multi line comment to wrap my minified code, the javascript code that I have wrapped with a comment breaks because */ is used in some of Leaflet's regular expressions.

There are two places in the code where */ is used inside a regular expression, e.g. .replace(/(\S+)\s*/g, replaceFn)

Line 873 and Line 4382

Would it be possible to get rid of the closing multiline comment tags inside those regular expressions to fix the lazy evaluation problem?

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