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

Imports are missed when imported file is utf8-bom encoded and the @import is on the first line #121

Open
rikrak opened this issue Mar 1, 2024 · 0 comments

Comments

@rikrak
Copy link

rikrak commented Mar 1, 2024

I've noticed that if an import file is UTF8-BOM encoded, and the first line of the file contasins an @import, the import is not processed.

two.scss [UTF8 encoded]

.two { display: none; }

utf8-bom.scss [UTF8-BOM encoded]

@import 'two';

import-utf8-bom.scss [UTF8 encoded]

@import 'utf8-bom';

results in:

// This file is auto-generated. Do not edit!
// baka:source C:\Dev\Src\baka\__tests__\__fixtures__\import-utf8-bom.scss

// #region @import './utf8-bom'; -> /Dev/Src/baka/C:\Dev\Src\baka\__tests__\__fixtures__\utf8-bom.scss
@import './two';
// #endregion

whereas I'd expect something like:

// This file is auto-generated. Do not edit!
// baka:source C:\Dev\Src\baka\__tests__\__fixtures__\import-utf8-bom.scss

// #region @import './utf8-bom'; -> /Dev/Src/baka/C:\Dev\Src\baka\__tests__\__fixtures__\utf8-bom.scss
.two { display: none; }
// #endregion
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

No branches or pull requests

1 participant