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 244498 - Syntax Highlighting in HEREDOC / NOWDOC
Summary: Syntax Highlighting in HEREDOC / NOWDOC
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal with 5 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 23:53 UTC by w_barath
Modified: 2015-11-23 11:58 UTC (History)
1 user (show)

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 w_barath 2014-05-14 23:53:07 UTC
Could someone please change the HEREDOC / NOWDOC behaviour to use the EOF argument as a hint for syntax highlighting, and if one matches, perform syntax highlighting instead of treating it like a string?  That would make the editor content a hell of a lot more semantic:

<?
# this block should be syntax highlighted as ECMAScript:
$JS=<<<'ECMA'
jQuery(function($){
  $("#id").click(function(){
    $(this).css({background:'red'});
  });
});
ECMA;

# this block should be syntax highlighted as inline HTML/CSS:
$CSS=<<<'CSS'
#id {background:green;}
CSS;

# this block should be syntax highlighted as HTML:
$BODY=<<<'HTML'
<div id=id>Hello World</div>
HTML

# this block should be syntax highlighted as HTML (with interpolation):
echo <<<HTML
<doctype=html>
<html>
<head>
<script src=/media/jquery?1.8.2>
<script>$JS</script>
<style>$CSS</style>
</head>
<body>$BODY</body>
</html>
HTML