Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Allow for quoted empty strings with double-quotes #16

Closed
RomanHotsiy opened this issue Dec 20, 2016 · 0 comments
Closed

Allow for quoted empty strings with double-quotes #16

RomanHotsiy opened this issue Dec 20, 2016 · 0 comments

Comments

@RomanHotsiy
Copy link
Contributor

Minimal reproducible sample:

var postcss = require('postcss');
var conditionals = require('postcss-conditionals');
 
var works = `
  @if '' == '' {
    success {}
  }
`;

// this works
var output = postcss()
  .use(conditionals)
  .process(works)
  .css;

console.log(output) // success {}

var fails = `
  @if "" == "" {
    success {}
  }
`;

// this trows error
var output2 = postcss()
  .use(conditionals)
  .process(fails)
  .css;

/*
CssSyntaxError {
     column: 3,
     line: 2,
     message: "postcss-conditionals: <css input>:2:3: Failed to parse expression",
     name: "CssSyntaxError",
     plugin: "postcss-conditionals",
     reason: "Failed to parse expression",
     source: "\n @if \"\" == \"\" {\n success {}\n }\n"
     ...
}
*/```
andyjansson added a commit that referenced this issue Dec 20, 2016
Allow for quoted empty strings with double-quotes (fixes #16)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant