Alan Storm Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 22, 2010; 10:22
Alan Storm
Syntax highlighting in files that contain HTML, Javascript and PHP
The follow screenshot is a simplified version of a PHP view file I was recently working on with "HTML" selected as the language (actual text included at the end of this email)
http://alanstorm.com/testbed/as_html.png
On line 17 the syntax highlighting goes pear shaped. (note the different color <p> tags)
If I switch the language to Javascript, the code in the script block looks right, but the HTML and PHP lose their syntax highlighting. If I switch the language to PHP a similar problem occurs.
Is there a way to use BBEdit to ensure that files which contain PHP, HTML and Javascript (common in PHP MVC view files as well as legacy PHP applications) syntax highlight correctly without toggling back and forth between HTML and Javascript?
Thanks for any help, or even a definitive "Nope, that can't be done"!
-- Alan Storm http://alanstorm.com
Actual Text from Screenshot -------------------------------------------------- <?php echo "This is a test"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled</title> <meta name="generator" content="BBEdit 9.2" /> </head> <body> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('#order_summary tr').click(function(e){ if(jQuery(this).is('tr.info')) { jQuery('#row_detail_'+numeric_id+' td').html('<p>Loading</p>'); } }); });
var foo = "No Color";
</script> </body> </html>
-- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "support@barebones.com" rather than posting to the group.
Jan 22
Jim Correia Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 22, 2010; 10:51
Jim Correia
Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 22
Alan Storm Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 22, 2010; 13:13
Alan Storm
Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 26
Peter Weil Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Jan 26, 2010; 10:25
Peter Weil
Re: Syntax highlighting in files that contain HTML, Javascript and PHP
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!