Home Download Buy Blog Forum Support

PHP - MySQL syntax highlight problem

PHP - MySQL syntax highlight problem

Postby ondratra on Sun Dec 16, 2012 10:33 pm

I got a problem with syntax higlight i hope you will help me with. I like to start my MySQL code inside PHP files on newline like a guy in this thread:
http://superuser.com/questions/355766/h ... -php-strin

Highlight ok in this example:
$query = "SELECT data
FROM table
WHERE param = 1

but no higlight in this example:
$query = "
FROM table
WHERE param = 1

so i searched the Packages / PHP / PHP.tmLanguage for a MySql string regexp.
On line 2061 i found this: <string>'\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)</string>
which should match the case. Unfortunately i wasn't able to figure out where is the problem.

Can some some experienced user help with this please?
Posts: 1
Joined: Sun Dec 16, 2012 10:22 pm

Re: PHP - MySQL syntax highlight problem

Postby macnewbold on Fri Jun 07, 2013 8:23 pm

I have the exact same issue.

I've been trying to figure out whether or not \s* in the regular expression includes newline characters, or whether the regular expressions are being evaluated as multi-line regex, but haven't been able to get to the bottom of it. Every regex tester I've tried matches the string across multiple lines with \s* matching newlines as well as other whitespace. But ST2 definitely isn't matching it.

These users are also trying to find an answer:
Posts: 1
Joined: Fri Jun 07, 2013 8:21 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 18 guests