imsky / imsky/cssFx

@import regexp error

Open
#16 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
274
Forks
29
PR merge metrics
No merged PRs in 30d

Description

This is the RegExp used when finding @import statements:

/\@import\s+(?:url([\'\"]?(._)[\'\"]?))\s_\;?/gim;

The problem is that the resulting url sometimes include "double quotes", so then the browser outputs a 404 error.

It works anyway, but the error is uggly.

You can change, for example, the "(._)" part for something like ([^\")]_

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the @import regular expression described in the issue and inspect how its captured URL is passed to the browser. Adjust the quoted-URL matching so quotes are not included in the resulting URL, then verify that imported stylesheets no longer produce a 404 caused by double quotes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.