Skip to content

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

Description

@rikrak

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions