Replace \x1b with \e #130

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@bigfoot90
Contributor

Do not merge yet

My IDE suggest me to replace \x1b characters with \e.
I've done the replace only in tests to check if some thing breaks.
Is this a more optimized way to write the same character?

@bigfoot90 bigfoot90 Replace \x1b with \e
638c312
@bigfoot90
Contributor

Reading the web I see that \x1b is equal to \e and to \0x1B and \033.
That's ever the same character.

I prefer \e because it's more readable.

But what about these lines https://github.com/phpmyadmin/sql-parser/pull/130/files#diff-5897b34c7e97d0c27240a808838bc33eR371?
Where text\e[33m will become text\\x1B[33m

If it's ok for you I can continue with this PR.

@bigfoot90
Contributor

:-( I see now the results from travis, it seems that php5.3 does not support parsing of \e characters.
Closing.

@bigfoot90 bigfoot90 closed this Jan 24, 2017
@nijel
Member
nijel commented Jan 24, 2017

That's exactly reason why we don't use it, see 3ece9ee.

@nijel nijel self-assigned this Jan 24, 2017
@bigfoot90
Contributor

OK, good to known.

@bigfoot90 bigfoot90 deleted the bigfoot90:ide-suggestions branch Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment