@markuplint/html-parser
Advanced tools
Comparing version 1.0.0-alpha.5 to 1.0.0-alpha.6
@@ -9,3 +9,4 @@ "use strict"; | ||
var get_end_line_1 = __importDefault(require("./get-end-line")); | ||
var reAttrsInStartTag = /(\s*)([^\x00-\x1f\x7f-\x9f "'>\/=]+)(?:(\s*)(=)(\s*)(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s]*)))?/; | ||
// eslint-disable-next-line no-control-regex | ||
var reAttrsInStartTag = /(\s*)([^\x00-\x1f\x7f-\x9f "'>/=]+)(?:(\s*)(=)(\s*)(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s]*)))?/; | ||
function attrTokenizer(raw, line, col, startOffset) { | ||
@@ -12,0 +13,0 @@ var attrMatchedMap = raw.match(reAttrsInStartTag); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.reTag = /<([^>]+)>/; | ||
exports.reTagName = /^(?:[a-z][^\u0000\u0009\u000A\u000C\u0020\/>]*)/i; | ||
// eslint-disable-next-line no-control-regex | ||
exports.reTagName = /^(?:[a-z][^\u0000\u0009\u000A\u000C\u0020/>]*)/i; | ||
/** | ||
@@ -6,0 +7,0 @@ * PotentialCustomElementName |
@@ -6,5 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var const_1 = require("./const"); | ||
var attr_tokenizer_1 = __importDefault(require("./attr-tokenizer")); | ||
var const_1 = require("./const"); | ||
var reAttrsInStartTag = /\s*[^\x00-\x1f\x7f-\x9f "'>\/=]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^\s]*))?/; | ||
// eslint-disable-next-line no-control-regex | ||
var reAttrsInStartTag = /\s*[^\x00-\x1f\x7f-\x9f "'>/=]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^\s]*))?/; | ||
function parseRawTag(raw, nodeLine, nodeCol, startOffset) { | ||
@@ -19,3 +20,4 @@ var line = nodeLine; | ||
var tagWithAttrs = matches[1]; | ||
var tagNameSplited = tagWithAttrs.split(/[\u0000\u0009\u000A\u000C\u0020\/>]/); | ||
// eslint-disable-next-line no-control-regex | ||
var tagNameSplited = tagWithAttrs.split(/[\u0000\u0009\u000A\u000C\u0020/>]/); | ||
var tagName = tagNameSplited[0] || tagNameSplited[1]; | ||
@@ -22,0 +24,0 @@ if (!tagName || (!const_1.reTagName.test(tagName) && !const_1.rePCEN.test(tagName))) { |
@@ -7,3 +7,2 @@ "use strict"; | ||
var ml_ast_1 = require("@markuplint/ml-ast/"); | ||
var parse5_1 = __importDefault(require("parse5")); | ||
var uuid_1 = __importDefault(require("uuid")); | ||
@@ -13,2 +12,3 @@ var get_end_col_1 = __importDefault(require("./get-end-col")); | ||
var is_document_fragment_1 = __importDefault(require("./is-document-fragment")); | ||
var parse5_1 = __importDefault(require("parse5")); | ||
var parse_raw_tag_1 = __importDefault(require("./parse-raw-tag")); | ||
@@ -314,3 +314,3 @@ var tag_splitter_1 = __importDefault(require("./tag-splitter")); | ||
} | ||
else if (/^<\/[a-z0-9][a-z0-9:-]*>$/i) { | ||
else if (/^<\/[a-z0-9][a-z0-9:-]*>$/i.test(html)) { | ||
// close tag | ||
@@ -317,0 +317,0 @@ } |
{ | ||
"name": "@markuplint/html-parser", | ||
"version": "1.0.0-alpha.5", | ||
"version": "1.0.0-alpha.6", | ||
"description": "HTML parser for markuplint", | ||
@@ -23,7 +23,7 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/ml-ast": "^1.0.0-alpha.3", | ||
"@markuplint/ml-ast": "^1.0.0-alpha.4", | ||
"parse5": "^5.1.0", | ||
"uuid": "^3.3.2" | ||
}, | ||
"gitHead": "de677b589bf54651f23d23c7766d113b097053ce" | ||
"gitHead": "a0579c5cf64e6b8a4506b3d398f4e6be5c674706" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
218437
915