adrianlee44 / atom-aligner

Easily align multi-line with support for different operators and custom configurations
https://atom.io/packages/aligner
MIT License
77 stars 3 forks source link

Bug: Removing code (!) #66

Closed tomkiss closed 7 years ago

tomkiss commented 7 years ago

When aligning this section of react javascript:

              {
                navItem:  false,
              },
              // events
              {
                onClick: this.props.onClick,
              },

The on click value is removed.

Doesn't fill me with confidence when aligning large blocks of text 🤔

adrianlee44 commented 7 years ago

Thanks for reporting! Let me take a look.

What language pack are you using?

tomkiss commented 7 years ago

Just the base atom-aligner (I have installed but disabled the aligner-javascript and aligner-scss to narrow down the issue).

adrianlee44 commented 7 years ago

I'm trying to reproduce the issue right now but having trouble doing so.

atom-aligner requires on other language package to parse your code. Did you install additional packages for syntax highlighting for react, such as https://atom.io/packages/react?

What block have you selected or where was your cursor when you try to align the block above?

Any chance you can paste a larger code block?

Thanks!

tomkiss commented 7 years ago

Heya, No additional packages parsing the code, afaik. This occurs when type is set to "Javascript with JSX". I can repro with just the text above pasted in new file with type set to Javascript with JSX.

adrianlee44 commented 7 years ago

Not sure if you are still using Aligner but are you still experiencing the issue with the latest version (v1.2.1)?

tomkiss commented 7 years ago

Hi there, just tried this and it appears to be fixed now :)

Thanks!

adrianlee44 commented 7 years ago

Glad to hear that the issue is resolved.