Hi,

I've hacked a call to tidy into HTML.pm and stuffed the output into
SA::HTML->{html}{tidy_report} and SA::HTML->{html}{tidy_errors}.
tidy_report() is called from within html_render(). I wasn't sure if
html_render() was the best place to write the report to a file and while
digging around I found the following in MsgContainer.pm:

297       my @lines = @{$html->html_render($text)};
298       $self->{rendered} = join('', @{$html->html_render($text)});       # 
rendered text

Is there a reason line 298 is not

298       $self->{rendered} = join('', @lines);       # rendered text

instead?

Realistically, I'm only adding test code so there's no reason I can't call
tidy_report() directly from MsgContainer rather than from html_render(),
and just write to file from within tidy_report(). That seems cleaner,
though I do end up touching two files instead of one.

On the surface the two calls to html_render() seem inefficent but I've
only been mucking with the code for a few hours so if there is a
reason for two calls it's likely I'm missing it.

Thanks,

-- Bob

Reply via email to