Hello

I came across this blog which compared the most famous text editors syntax
highlighting feature.

http://planetozh.com/blog/2007/06/text-editors-for-coders-deathmatch-review/

The test is to check the php code for proper syntax highlighting

This is the Test Code:

<?php
$pattern = '(<body[^>]*?>';
/*  abcdef
        multi-line
*/
$hello = <<<HELLO
        <<<<--! jk -->
        >>>
        /*
        abcdef
HELLO;
function echoit($pattern) {
        echo "123 456 $pattern";
        echo '123 456 $pattern';
        foreach (array(1,2,3) as $val) {
                echo $val;
        }
}
echo "/*";
echo '//';echoit($pattern);
?>.




>From the blog:

cite:
--------------------------------------------------------------------------------
>From this incongruous yet efficient snippet, I was expecting to check, at
a glance and in less than 10 seconds, the following 9 tests:

   1. Line 3: will the editor think the regular expression pattern is actually
the closing ?> PHP tag
   2. Line 5 to 7: can you collapse multiline comments
   3. Line 9: heredoc, part one, does the editor understands we're just defining
a string
   4. Line 12: heredoc, part tow, does the editor gets that we're not starting a
multi line comment
   5. Line 16: can you collapse regular code block
   6. Line 17 & 18: will the editor display differently these two lines(variable
in the first one, just text in the second one)
   7. Line 19: how will the editor display nicely (or not) the nested code
folding marks
   8. Line 24: will the editor think we're starting a multi line comment
   9. Line 25: will the editor think we're commenting out the line
--------------------------------------------------------------------------------


I tested out the code and it did fail the test.

Can the devs give this a shot ?

-- 
<http://forum.pspad.com/read.php?2,46034,46034>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem