Skip to content

Add hash for block elements #10

Open
@petdance

Description

@petdance

Migrated from RT originally by [email protected]

Would be nice to have a list of elements which "break line" when textified. I actually this in my HTML::AsText::Fix:

# source: http://en.wikipedia.org/wiki/HTML_element#Block_elements
%isBlockElement = map {; $_ => 1 } qw(
  p
  h1 h2 h3 h4 h5 h6
  dl dt dd
  ol ul li
  dir
  address
  blockquote
  center
  del
  div
  hr
  ins
  noscript script
  pre
);

Not sure what to do with <br>: it breaks line but it's not a block element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions