NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Wrong syntax hilight


Joined: 02 Aug 2006
Posts: 5
Reply with quote
Hello,
I have found small problem with code hilight
try
Code:

<?echo "Test"?>


I know what if put space after <? everything will be ok, but from time to time I have to work with such type of code, so it will be great if you fix it.
View user's profileFind all posts by ixolabsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
There is no problem with highlighting this code. From PHP perspectives this code is HTML (or whatever outer language is).
Try to run it and you'll see Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Aug 2006
Posts: 5
Reply with quote
sorry,
but this type of code is correct for PHP and PHP interprets it as correct PHP code.
More examples, what works fine as PHP code and I had correct hilight of it in Zend Studio.
Code:

<?if ($str = '123') echo 'Ok';?>
<?CMain->AddIt('123');?>

In such type of code you will not get PHP code hilight. Bu if write
Code:

<? if ($str = '123') echo 'Ok';?>
<? CMain->AddIt('123'); ?>

everythin will be ok ( I mean put space after <?), so I think this a problem of syntax hilight.

Thank you.
View user's profileFind all posts by ixolabsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
You're right.
I don't know why, but I thought you mean <?php opening tags. In this case a space would be required.
With short tag, it's not required and therefore we'll have to correct highlighter.

Thanks.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Wrong syntax hilight
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic