|
|
|
This is a regular expression that I temporarily commented out. Even if I use /* ... */ to close the comment I still get the same results. I think it's pretty strange to have to modify the contents of a comment to make Aptana think it's a comment. That defeats the purpose of a comment when you want to quickly comment out a line of code. In my case if I modify the regular expression so that Aptana doesn't think it's PHP and come back to it a few days later I may not remember what the original structure of the regular expression was.
Hello, Don.
This is not the problem of Aptana Studio, but PHP language itself. Symbols "?>" are recognized as the end of PHP script. If it is possible use "*>" please. Thank you, I'm not sure if you guys understand how crazy you sound with your replies. This is a bug plain and simple. I don't care what language you're programming in a comment is a comment period. The content of a comment should NEVER be interpreted as code. I've been developing software for 30 years and I've never come across an editor that has inadvertently interpreted a comment as code. In PHP these are comments:
// preg_match('/<option value="(?P<langid>.?)".?>(?P<langname>.*?)</si', $body) /* and just because they happen to contain actual code doesn't mean they should be interpreted any differently from other comments. If you've done software development then I'm pretty sure you've temporarily commented out a line of code while debugging. This is exactly what I've done in the PHP snippet above. This is a BUG plain and simple. Reopening.
You do have a point here, however, it's not completely accurate. Thanks I understand that there is need to get the 1.0 issue out quickly as possible, and so some bugs have to be deferred to be fixed later.
I just want to make sure you are aware that this bug effectively makes Aptana unusable with some of the premier open source PHP projects. Drupal and Wordpress come to mind, but I'm sure there are others. I can wait myself but you'd probably get better reviews and buzz on your 1.0 release if this bug was fixed. Also note that this problem isn't limited to <?php ?> tags inside comment blocks but <script> tags (and possibly others as well). Just my $0.02 === PHP Open/Close Tags Not Ignored When Inside Multi-Line Comments ===
Was gonna add my own bug report, but found this and a couple others first, so I'll add my nuisance here as well. This is an important issue that has limited me from using any IDE with the exception of Adobe Dreamweaver, which honestly seems to be the only IDE that does this correctly, and I've tried a loooot of different editors of the years. This REALLY DOES hold me back from moving forward towards any commercial version, which I'd gladly pay for if it weren't for that issue. I pay for and use Dreamweaver because of that. But I digress... This problem exists as well in the stand alone 32 bit version 1.2.1.020234 for linux.
Guys, to elaborate on Pavel's note, this issue is now resolved and the fixed version will be available with the 1.1 release.
Thank you, and of course, many thanks to Pavel! Cheers, -Shalom G. |
|||||||||||||||||||||||||||||||||||||||||||||||||
<?php
// preg_match('/<option value="(?P<langid>.?)".?>(?P<langname>.*?)</si', $body)
echo 'Hello World';
?>
All that is after ?> in your snippet is 'html' code actually (?> closes single line comment and php block).
Regards,
Pavel.