Move the void element list into the main config file

This commit is contained in:
Jeremy Ruston
2013-02-03 17:44:28 +00:00
parent 4289a027d4
commit c85acd71fe
2 changed files with 4 additions and 3 deletions

View File

@@ -26,8 +26,6 @@ This is a widget invocation
exports.name = "html";
exports.types = {inline: true, block: true};
var voidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
@@ -71,7 +69,7 @@ exports.parse = function() {
attrMatch = reAttr.exec(attributeString);
}
// Process the end tag
if(!isSelfClosing && voidElements.indexOf(tagName) === -1) {
if(!isSelfClosing && $tw.config.htmlVoidElements.indexOf(tagName) === -1) {
var reEndString = "(</" + $tw.utils.escapeRegExp(tagName) + ">)",
reEnd = new RegExp(reEndString,"mg"),
content;