Success

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
5 Aug 2013

because some IDEs (SublimeText) get confused.

This regexp is a bit confusing but it's mean to work like this:
Inside the [], the first \ (PHP string) escapes the second one and the third is literal. So this give us regexp like /(^|[^\\])D/ in which the first one again (regexp) escapes the second one.

Unfortunately, SublimeText (and maybe other editors) misinterpret the meaning of the third \. Of course they are wrong and I don't think it's a great idea to write code to appeal to wrongly behaving editors but I don't think there's any harm in this minor change. What will happen now is that the third \, instead of being literal, will escape the fourth one and we will still end up with a regexp like /(^|[^\\])D/. So there should be no change to functionality whatsoever.

avatar okonomiyaki3000 okonomiyaki3000 - open - 5 Aug 2013
avatar brianteeman
brianteeman - comment - 13 Oct 2013

The related item on the issue tracker has been closed as not joomla core

Add a Comment

Login with GitHub to post a comment