GeSHi Bug Tracker - GeSHi
Viewing Issue Advanced Details
53 lang feature N/A 12-24-05 10:15 12-24-05 21:51
BenBE  
nigel  
low  
assigned 1.1.1alpha3  
suspended  
none    
none  
0000053: Top-Level context for PHP only highlighting
Because you sometimes require highlighting of PHP sources without extra starters\enders it might be useful to create special language file entry points for this, i.e. language files defaulting to "already being in a PHP context".
IIRC this should require only creating 3 little files to support all current PHP language starters.
related to 0000002closed nigel Should be possible to tweak context data dynamically 

Notes
(0000198)
nigel   
12-24-05 15:23   
This one is an interesting problem. We are assuming that we are already in PHP context, so then <?php and ?> should not apply.

That means that HTML and Javascript in any source highlighted this way will not be highlighted. (Unless there was an OCC that started at ?> or %>, finished at <? and was HTML).

But what to call the dialect(s)? There will be one for php, php4 and php5.

I think this may rely on fixing up the context duplication bug first (bug 0000002). Then that can be used to make this easier.

(0000202)
BenBE   
12-24-05 15:29   
What about phpraw, php4raw and php5raw?
(0000207)
nigel   
12-24-05 21:51   
I guess they are OK names, but I can see this biting us in the butt later. Lots of people are going to want PHP highlighting and I'll be dammed if it starts with <?php and damned if it doesn't...

C'est la vive :)