Re: Placement of comments

Hi Martin,


> <h1>document title</h1>
> <p>bla bla bla</p>
>
> <!-- very big table -->
> <table>
> ....
> </table>
>
> Amaya keeps comments, but it insists on moving them from immediately before
> the next construct to immediately after the previous construct. The above
> example turns into:
>
> <h1>document title</h1>
> <p>bla bla bla</p>
> <!-- very big table -->
>
> <table>
> ....
> </table>

Humm, this really sounds like buggy behavior. I didn't double check
for sure, but it means that Amaya isn't preserving the text nodes as
it should. Although hard to understand at first, in your first example
what you have is something like:

<h1>document title</h1>
#text (line break between "h1" and "p")
<p>bla bla bla</p>
#text (two line breaks between "p" and comment)
<!-- very big table -->
#text (break between comment and table)
<table>

This is counter-intuitive, I know, but what's happening under the hood.


> This looks rather inappropriate when looking at the source again. If there's
> some frequent use of comments after (rather than before) a construct, I'd
> like to know. Otherwise, it'd be really nice if this were fixed, thanks!

I'm guessing that Amaya is having trouble in parsing/representing such
construct. If so, then it's a bug and should, in my opinion, be given
priority given that parsing/serializing issues have strong
implications and can explain a number of issues.


> Regards,   Martin.

Cheers,
 Helder

Received on Monday, 18 January 2010 13:05:55 UTC