Skip to content

Regex not successful for cases #4

@schmorrison

Description

@schmorrison

I am attempting to include this plugin with my build pipeline. Currently I am only passing the following types of image elements:

<source srcset="/path/to/example-image-100x100.png"> and
<img srcset="/path/to/example-image.png">

In trying to figure out the problem, it seems like the Regex doesn't accept either of these cases. I edited the Regex to be much more relaxed, eg. ([a-z\-_0-9\/\:\.]*\.(jpg|png)) which does seem to function for my case, however I am only extracting from HTML. I am not sure how that might break usage in CSS (or even for edge cases in HTML).

I didn't submit a PR for this for the reasons mentioned above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions