#577622 aspell: Ignores HTML's lang attribute

Package:
aspell
Source:
aspell
Description:
GNU Aspell spell-checker
Submitter:
Francois Gouget
Date:
2010-04-13 07:54:05 UTC
Severity:
normal
#577622#5
Date:
2010-04-13 07:52:41 UTC
From:
To:
To reproduce this bug create an html file with the following content:
--- Start mixed.html ---
<html>
<body>
  <!-- English comment -->
  <p lang="en">Some English text.</p>
  <p lang="fr">Du texte en Français.</a>
</body>
</html>
--- End mixed.html ---

Then check its content with one of the following commands:
   aspell check mixed.html
   cat mixed.html | aspell -a --mode html --lang fr
   cat mixed.html | aspell -a --mode html --lang en

It ignores the text in the comment as it should when in html mode.
However it does not take the lang attribute into account and thus
systematically reports errors either in the French paragraph or in the
English one.

Ideally if no language and dictionary is specified on the command line it
would automatically pick the right dictionary for the paragraph based on
the lang attribute.

But if a language is specified on the command line it should definitely
ignore paragraphs with a non-matching lang attribute.