This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from rwjblue/prevent-void-from-including-comment
Prevent void elements from always including a comment node.
- Loading branch information
Showing
4 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { forEach } from "./array-utils"; | ||
|
||
// The HTML elements in this list are speced by | ||
// http://www.w3.org/TR/html-markup/syntax.html#syntax-elements, | ||
// and will be forced to close regardless of if they have a | ||
// self-closing /> at the end. | ||
var voidTagNames = "area base br col command embed hr img input keygen link meta param source track wbr"; | ||
var voidMap = {}; | ||
|
||
forEach(voidTagNames.split(" "), function(tagName) { | ||
voidMap[tagName] = true; | ||
}); | ||
|
||
export default voidMap; |