Skip to content
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

LESS: Editor inserts superfluous and incorrect braces #260

Open
mawcs opened this issue Dec 11, 2015 · 2 comments
Open

LESS: Editor inserts superfluous and incorrect braces #260

mawcs opened this issue Dec 11, 2015 · 2 comments

Comments

@mawcs
Copy link

mawcs commented Dec 11, 2015

In my nested styles, the LESS editor will automatically insert incorrect and unneeded braces when I hit a carriage return. This file is a preexisting file that has compiled fine for months before using in this editor. When I try to compile with the editor-inserted braces, the less compiler produces: Error: Unrecognised input. Possibly missing opening '{' in file

Attached is an animated GIF showing the defect in action.

less_editor_braces_bug

Steps to reproduce
Create a LESS file with various levels of nesting with @media screen and (max-width: 50em){...} as the outermost block. Insert cursor in the middle of a block 1 to 5 levels deep. Hit return.

Expected results
A newline is created with the cursor automatically indented correctly. No additional characters needed.

Actual results
A newline is created a with the cursor at the correct indentation, but a new, erroneous brace is added below the cursor. This can be repeated 2 or 3 times (I cannot determine why it varies).

@mawcs
Copy link
Author

mawcs commented Dec 11, 2015

It just occurred to me that this is happening inside of a @media screen{...} block. I'm not seeing this behavior in places that are not in a media block. I've updated my "steps to reproduce" accordingly.

@WORMSS
Copy link

WORMSS commented Jul 19, 2017

This happens to a lot of things in Java files too, so I don't believe this is less, but eclipse doing this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants