Skip to content

Missing whitespace in import causes translation to stop #3690

@zhusjfaker

Description

@zhusjfaker

To reproduce:

a.less

.a {
  font-size: 16px;

  .b {
      margin: 0;
      color: #000;
  }
}

index.less

@import"./a";

.a {
    font-size: 16px;

    .b {
        margin: 0;
        color: #000;
    }
}

Current behavior:

gen css ->

@import "./a";
.a {
  font-size: 16px;
}
.a .b {
  margin: 0;
  color: #000;
}

Expected behavior:

.a {
  font-size: 16px;
}
.a .b {
  margin: 0;
  color: #000;
}
.a {
  font-size: 16px;
}
.a .b {
  margin: 0;
  color: #000;
}

Environment information:

  • less version: 3.13.0
  • nodejs version: v16 lts
  • operating system: darwin | macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions