heredoc does not end inner chunk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nXhtml |
In Progress
|
Low
|
Unassigned |
Bug Description
This bug was originally added on EmacsWiki, but I decided to move it here since it is easier to handle bug reports here. The original bug reporter wrote (I will add my answers from the wiki as comments to this bug):
I have chunk problems with 1.99. This works, it detects the PHP and JS chunks properly:
<?
$stuff = <<<EOTHTML
<script type="text/
//<![CDATA[
var stuff;
//]]>
</script>
EOTHTML;
However if I don’t close the inner chunk before EOTHTML, because I want to add some conditional code after it in PHP then it thinks the part of the buffer after EOTHTML is still in JS mode which is not good:
<?
$stuff = <<<EOTHTML
<script type="text/
//<![CDATA[
var stuff;
EOTHTML;
Changed in nxhtml: | |
importance: | Medium → Low |
Thanks for the thoughts. I can see what you mean, but I am not sure it can be solved easily.
You want the inner chunk with javascript to end together with the heredoc chunk. Yes, I think you are right. It is some work to do this of course. Contributions are welcome.
In the mean time you can avoid using html in the heredoc. That will end the chunk where you want it (but will not provide the convenience of html syntax coloring and javascript dito).