atom-alignment icon indicating copy to clipboard operation
atom-alignment copied to clipboard

Issue with ===

Open camdagr8 opened this issue 6 years ago • 1 comments

=== becomes = = =

camdagr8 avatar Mar 15 '18 00:03 camdagr8

I have tried this and there's an easy way to fix this; i'm assuming your settings look like this: Align By: =>, :=, :, =, === Alignment Space Chars: =>, :=, :, =, ===.

This means that the aligner will look for the symbols in that order. You are trying to align === but because === is basically a triple = , the program will break the === apart and return a space before every =. example: $name === "Jeff"; $imalongvariable === 7

will look like: $name........... = = = "Jeff"; $imalongvariable = = = 7

If you were to put the === before everything like this: Align By: ===, =>, :=, :, = Alignment Space Chars: ===, =>, :=, :, =

The aligner will now try to look for a === before it looks for a =, so the === will stay together as a whole. example: $name === "Jeff"; $imalongvariable === 7

will look like: $name........... === "Jeff"; $imalongvariable === 7

edit: I had some trouble aligning my examples, so i used dots instead of spaces and that fixed it.

Splendoid avatar Nov 21 '19 10:11 Splendoid