Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude urls from css imports #1036

Merged
merged 1 commit into from
Sep 28, 2020
Merged

Conversation

xt0rted
Copy link
Member

@xt0rted xt0rted commented Sep 24, 2020

Pull Request Badge

Checklist:

  • If this PR is a new feature, please provide at least one example link
  • Make sure all of the significant new logic is covered by tests

This is another thing I found while working on #905. I was trying to exclude things like url("https://...") so we didn't do needless lookups and it turns out the same thing happens with css imports. I'm sure this exists for LESS and SASS as well but didn't dig into those yet.

I'm wondering if there's a better way to handle this. Any ideas?

You can see an example of this here:

${captureQuotedWord}
['"] # beginning quote
(?<$1>
(?!https?:\/\/) # exclude urls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a negative look ahead, is what I ended up doing for #1033 as well.

@stefanbuck stefanbuck merged commit 492b64b into OctoLinker:main Sep 28, 2020
@xt0rted xt0rted deleted the css-url-imports branch September 29, 2020 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants