Skip to content

single and double quote support in @import statement #164

New issue

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

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

Already on GitHub? # to your account

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];

# for free to join this conversation on GitHub. Already have an account? # 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