Re: Near miss that might be a bug

[email protected] ("Jochen Stenzel") Wed, 30 Jan 2002 22:21:44 +0100
Newsgroups perl.perlpoint
Message-ID <[email protected]>
>I defined LLINK to be macro that expanded to EMBEDed Perl to generate
>the HTML for the link, and then generated an XREF with that HTML
>as an "EMBED" in the body.  Thus...
>
>   +LLINK:
>   \EMBED{lang=perl}
>   $name = "__name__";
>   $gif = "__gifname__";
>   $img = "Images/" . $gif . ".gif";
>   return("\\XREF{name=\"$name\"}<\\EMBED{lang=html}<IMG SRC='$img' border=3>\\END_" . "EMBED >");
>   \END_EMBED
>
>    \LLINK{name=Contact gifname=contact}
>
>
>I had to split the inner "END_EMBED": otherwise the embedded 
>perl got truncated...

This should be documented I suppose. The parser searches for the first
\END_EMBED and assumes it closes the embedded part.


>The final HTML that I got was about the closest near miss I can imagine...
>
>   <IMG SRC='Images/contact.gif' border=3><A HREF="page0003.html#Contact"> </A>
>
>...
>Only thing is, the image comes BEFORE the link, not as its body!
>
>Is this a bug?  Or have I missed or misunderstood something?

I think you found a parser bug. I need to investigate a parser trace to
see what went wrong.

            Jochen