screem should not insert HTML Entities whithin PHP
syntax highlighting. When I wan't to insert an &&,
then I get & ... the &; for the first insertion of
& and "amp" for the second one.
The problem is bigger though as in a lot of cases this is
exactly what you want. Now screem could check which tag
the cursor is in when these are typed, and if it is <?php or
<? not offer the expansion, but even then this can still be
not what is wanted, as you could be outputting content,
either in quote marks, or using print <<< EOF
Checking the tag the cursor is in can also be a slow process
as the document structure needs to be built, so depending on
the size of it a delay of upto or more than a second when <
or & is pressed.
The problem also hits comments, cdata sections as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As a temporarily solution I'd suggest to disable entitiy
insertion completely if the mime-type of the file is php, as
using HTML together with PHP is bad style. Using a template
engine is a quite better way to output HTML with PHP. But
that's only my opinion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
CVS head now checks the current context using the document
tree which sorts this problem out, however it doesn't
rebuild the tree, so the context may not be accurate for the
current state. It has the advantage of being faster than
the previous method though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=736
similar problems occur with < expanding to <>.
The problem is bigger though as in a lot of cases this is
exactly what you want. Now screem could check which tag
the cursor is in when these are typed, and if it is <?php or
<? not offer the expansion, but even then this can still be
not what is wanted, as you could be outputting content,
either in quote marks, or using print <<< EOF
Checking the tag the cursor is in can also be a slow process
as the document structure needs to be built, so depending on
the size of it a delay of upto or more than a second when <
or & is pressed.
The problem also hits comments, cdata sections as well.
Logged In: YES
user_id=575462
As a temporarily solution I'd suggest to disable entitiy
insertion completely if the mime-type of the file is php, as
using HTML together with PHP is bad style. Using a template
engine is a quite better way to output HTML with PHP. But
that's only my opinion.
Logged In: YES
user_id=736
CVS head now checks the current context using the document
tree which sorts this problem out, however it doesn't
rebuild the tree, so the context may not be accurate for the
current state. It has the advantage of being faster than
the previous method though.