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

single and double quote support in @import statement #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

single and double quote support in @import statement #164

wants to merge 1 commit into from

Conversation

danielweck
Copy link

@danielweck danielweck commented Oct 15, 2021

Fixes #163

@WesSouza
Copy link

You might want to be more strict to only match the same ending quote as the starting quote:

const re = new RegExp(/@import\s(['"])(\D+?)\1;/, 'gm');

And then replace 1 with 2 on line 87 given the new group.

const importFile = result?.[2];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for @import only works with single quotes, not double quotes (regular expression match)
3 participants