heredoc does not end inner chunk

Bug #569742 reported by lborgman
6
This bug affects 1 person
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/javascript">
    //<![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/javascript">
    //<![CDATA[
    var stuff;
EOTHTML;

Revision history for this message
lborgman (lennart-borgman) wrote :

 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).

Changed in nxhtml:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
lborgman (lennart-borgman) wrote :

Actually the problem is now that the heredoc end mark may not be noticed. But the workaround is the same as above.

Changed in nxhtml:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.