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

Crash on inline comments without leading space #114

jwilsson opened this Issue Sep 22, 2018 · 0 comments


None yet
1 participant

jwilsson commented Sep 22, 2018

  • Node Version: 10.11.0
  • NPM Version: 6.4.1
  • postcss Version: 7.0.2
  • postcss-less Version: 3.0.0

If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.




const postcss = require('postcss');
const syntax = require('postcss-less');

const lessText = '//comment';

  .process(lessText, { syntax })
  .then((result) => {
  .catch((e) => {


CssSyntaxError {
  name: 'CssSyntaxError',
  reason: 'Unknown word',
  source: '//comment',
  line: 1,
  column: 1,
  message: '<css input>:1:1: Unknown word',
  input: { line: 1, column: 1, source: '//comment' }

Expected Behavior

A Comment node.

Actual Behavior

A crash with the above error.

How can we reproduce the behavior?

Run the provided JS example.

I think I have a fix, PR incoming shortly.

@jwilsson jwilsson referenced this issue Sep 22, 2018


Fix crash on inline comments. Closes #114 #115

2 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment