Skip to content

Conversation

@Krinkle
Copy link
Member

@Krinkle Krinkle commented Aug 10, 2021

The regex that was meant to handle this already accounted for a lot of edge cases, such as /css endpoints without .css, and query parameters like /css?foo or /css;foo, all to carefully avoid matching things like foocss.less or foo.css.bar.less.

However can still be any number of CSS resources served from URLs that don't match that pattern.

Instead of trying to match the path segment, just match the start of the URL, which should take care of any edge cases, given that we don't allow importing remote Less code for compilation anyway.

This is an amendment to #28. I've kept commit authorship credit in-tact.

Fixes #27.
Closes #68.

The regex that was meant to handle this already accounted for a lot
of edge cases, such as `/css` endpoints without `.css`, and query
parameters like `/css?foo` or `/css;foo`, all to carefully avoid
matching things like `foocss.less` or `foo.css.bar.less`.

However can still be any number of CSS resources served from URLs
that don't match that pattern.

Instead of trying to match the path segment, just match the start of
the URL, which should take care of any edge cases, given that we don't
allow importing remote Less code for compilation anyway.

Fixes #27.
Closes #28.
Closes #68.
@Krinkle Krinkle merged commit 168cb46 into main Aug 10, 2021
@Krinkle Krinkle deleted the fix-literal-url-imports branch August 10, 2021 01:26
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.

Compiler doesn't import some remote CSS files

2 participants