Skip to content

single and double quote support in @import statement - #164

Open
danielweck wants to merge 1 commit into
Quramy:masterfrom
danielweck:patch-1
Open

single and double quote support in @import statement#164
danielweck wants to merge 1 commit into
Quramy:masterfrom
danielweck:patch-1

Conversation

@danielweck

@danielweck danielweck commented Oct 15, 2021

Copy link
Copy Markdown

Fixes #163

@WesSouza

Copy link
Copy Markdown

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