Skip to content

Tolerate no-space around comparison operator #1068

@am11

Description

@am11

[Forwarding: https://github.com/sass/node-sass/issues/840]

Tested with latest master: 0135278.

Given the input:

$on: false;
@if $on == false {
 s { a: ss }
}

LibSass generates:

s {
  a: ss; }

If we remove space right after $on:

$on: false;
@if $on== false {
 s { a: ss }
}

The generated output is same.

If we remove space both before and after ==:

$on: false;
@if $on==false {
 s { a: ss }
}

It throws:

error reading values after $on

If we remove space only before false:

$on: false;
@if $on ==false {
 s { a: ss }
}

It throws:

error reading values after

(nothing after after)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions