Bug in PHP Code blocks...

We know you have an opinion on how things should be run around here. These are suggestions for the forums, and the website.This forum is not a place to ask for suggestions to your own coding (or otherwise) problems.

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Bug in PHP Code blocks...

Post by nielsene »

For some reason the code highlighter is collapsing two lines to one in some cases. While normally this isn't too big of a problem, it does mess up closing tags of heredocs:

Example Code

Code: Select all

$test=<<<END_TEST
Hello DevNet
This is the same source used in the PHP example next;
END_TEST;
if ($foo==&quote;bar&quote;) // this if should not be on the same line as the END above
Now as PHP

Code: Select all

$test=<<<END_TEST
Hello DevNet
This is the same source used in the PHP example next;
END_TEST;
if ($foo=="bar") // this if should not be on the same line as the END above
Notice how Code 4&amp;5 were collaposed to PHP 4. You can beat this by adding an extra newline between the HEREDOC end and the next statement, but that seems unusual.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Hi. This will be changed shortly.
Post Reply