![]() |
![]() | highlighting quotation mark(s) in javascript regexps | ![]() |
![]() |
![]() | ![]() |
Veteran
![]() |
![]() |
My previous post doesn't display as expected.
There's a bug in the syntax colorization for javascript. Here's the sample code to replicate the problem :
The algorithm used by PhpEd doesn't take into account the backslash symbol which escapes the quote and thus highlights '/g' as a string instead of ''' Thanks for fixing it ![]() |
|||||||||||||
|
![]() |
![]() | ![]() |
Site Admin
![]() |
![]() |
I'm not sure if this can be solved at all...
If we change highlighter and it starts recognizing everything between / and / as a regexp, it will fail in many other cases, for example: i = 5; a = 8/4 + 55/i; From the highlighter's perspectives /4 + 55/i will look like a regexp, whereas it is certainly not. |
|||||||||||
_________________ The PHP IDE team
|
![]() |
![]() | ![]() |
Veteran
![]() |
![]() |
Hi Dmitri,
I'm glad to see that you're back from holidays and thanks for your answer. To answer your remark, I'd say that I don't want the highlighter to recognize the regular expression between the '/', but rather not to recognize the backslash + quote as a string start, since the backslash is here to protect the quote... What do u think ? |
|||||||||||
|
![]() |
![]() | ![]() |
Site Admin
![]() |
![]() |
I think it's much easier
![]() |
|||||||||||
_________________ The PHP IDE team
|
![]() |
![]() | highlighting quotation mark(s) in javascript regexps | ![]() |
|
||
![]() |
![]() |
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
![phpexpress](/images/poweredby-pe-3.0-small.gif)