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

Aligning React Props #38

Closed simonlast closed 1 year ago

simonlast commented 9 years ago

This used to work, but it recently broke for some reason:

Before:

<TableRow
    store = {store}
    columns = {columns} />

After:

<TableRow
    store   = {store}
    columns = {columns} />
adrianlee44 commented 9 years ago

Thanks for reporting this @simonlast.

I'm not sure if this used to work since there hasn't been many changes to language-html recently. Let me send in a PR to language-html so aligner can align this correctly.

adrianlee44 commented 9 years ago

Is this code in a jsx file?

ambethia commented 8 years ago

Any movement on this? I'm happy to look into it. @adrianlee44 Yes, in JSX files.

adrianlee44 commented 8 years ago

@ambethia which language package are you using for jsx?

ambethia commented 8 years ago

@adrianlee44 https://atom.io/packages/react

Is there another package that would work with atom-aligner?

adrianlee44 commented 8 years ago

I'm not sure if there is another package that would work with atom-aligner but the issue with react package is that it doesn't parse the = character.

Based on this line, https://github.com/orktes/atom-react/blob/master/grammars/JavaScript%20(JSX).cson#L47, you can see that it includes 4 patterns, the attribute name, double quote, single quote and code.

None of these patterns include the = character and parse it into an assignment token.