Skip to content

Switch from regex to array to check if HTML element is block element or not #13

@mokkabonna

Description

@mokkabonna

var blockRegex = /^(address|blockquote|body|center|dir|div|dl|fieldset|form|h[1-6]|hr|isindex|menu|noframes|noscript|ol|p|pre|table|ul|dd|dt|frameset|li|tbody|td|tfoot|th|thead|tr|html)$/i

Double check that all elements listed here https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements are included

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions