This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252551 - PHP code not highlighted
Summary: PHP code not highlighted
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Smarty (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-22 12:30 UTC by llmll
Modified: 2015-05-22 12:30 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description llmll 2015-05-22 12:30:21 UTC
Smarty code is usually pure HTML output enriched with Smarty tags like [{blabla}] for template functionality. PHP features in [{php}] tags are correctly highlighted, as are HTML tags besides next to Smarty tags.

Whats not highlighted, are PHP tags beside Smarty tags. So this is missing IMHO:

[{if $anything}]                        // highlighted
    <h1>Anything is set</h1>            // highlighted
[{endif}]                               // highlighted
[{php}]                                 // highlighted 
    echo $anything2 ? 'set : 'notset';  // highlighted
[{/php}]                                // highlighted
<?=                                     // NOT highlighted
    $anything2 ? 'set : 'notset'        // NOT highlighted
?>                                      // NOT highlighted

It would be great, if the PHP syntax highlighted could also colorize the embedded PHP tags.