Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of %isHeadElement is misleading #9

Open
PhilterPaper opened this issue Mar 12, 2024 · 0 comments
Open

Documentation of %isHeadElement is misleading #9

PhilterPaper opened this issue Mar 12, 2024 · 0 comments

Comments

@PhilterPaper
Copy link

Originally opened by "bkb" 2015-11-16 as RT 109044 "Documentation of %isHeadElement is misleading". Please close the RT ticket.

==============================================================================

The documentation for %isHeadElement claims

This hashset contains all elements that elements that should be
present only in the 'head' element of an HTML document.

However, %isHeadElement contains tags like <script> which may be present either in the head or the body section of an HTML document.

==============================================================================

I fixed this in PhilterPaper/HTML-Tagset by changing the POD and code:

=head2 hashset %HTML::Tagset::isHeadElement

This hashset contains all elements that elements that may be
present in the 'head' element of an HTML document. Some, such as <script>,
may also by in the 'body'.

=cut

our %isHeadElement = (
  map {; $_ => 1 } qw(
    title 
    base basefont
    link 
    meta 
    object 
  ),
  %isHeadOrBodyElement,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant