Formatting of multiline comments in...

User 2508224 Photo


Guest
6 posts

Hi CoffeeCup,

Thanks for CoffeeCup - it's great!

I noticed a small glitch and I hope you can help. I'm working on php scripts (file extension .php) and want to block out multiline comments. I use /* to start the comment, and */ to end it. This works well for text and the comment is automatically formatted in green. However, when I block out a section of code, the automatic formatting in green goes wrong, as does the automatic formatting on the rest of the page. It doesn't affect the working of the script. An example is shown below. The comment is shown in green as expected, until the first < sign where the formatting turns dark blue. Comments further down the page are not rendered in green. I have attached the php file too.

It would be great if you could sort this out - or am I doing something wrong?

Thanks - time for coffee,

Niels

Example:

/* The site was originally designed to show two future concerts on the far
right of the page. It proved hard to design flyers that far ahead so the
two flyers on the far right are now the two most recent ones (in the past).
To show the two next two flyers on the right, enable the loop below and
change the start index in the loop above to 2. Also, swap the coordinates
of picpos[0] and picpos[1] further above in this function for a more
intuitive layout.

$intCurr = $intCurrent;
$intNext = $intCurr + 1;

for ($i = 1; $i > -1; $i--)
{
while (($intNext < count($flyers)) &&
(($flyers[$intNext] == '') ||
(substr($flyers[$intNext], 9) == substr($flyers[$intCurr], 9))))
$intNext++;
if ($intNext < count($flyers))
{
echo '<img class="backgroundpic" alt="Picture" ';
echo 'style="top: '.$picpos[$i][1].'px; left: '.$picpos[$i][0].'px" ';
echo 'src="'.$strFlyerDir.'/'.$flyers[$intNext].'.jpg">';
}
$intCurr = $intNext;
$intNext++;
}
*/
User 187934 Photo


Senior Advisor
20,271 posts
Online Now

CC hopes to have this in for the next update.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2508224 Photo


Guest
6 posts

Thanks Eric - I'm glad it's under control and I look forward to the next edition of CoffeeCup!

Niels

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.