node-html-parser
Advanced tools
Comparing version 4.1.3 to 4.1.4
@@ -665,3 +665,3 @@ import he from 'he'; | ||
if (this.rawAttrs) { | ||
const re = /\b([a-z][a-z0-9-_:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
const re = /([a-z()#][a-z0-9-_:()#]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
let match; | ||
@@ -1002,2 +1002,8 @@ while ((match = re.exec(this.rawAttrs))) { | ||
} | ||
// console.error('111111111111111111', currentParent.rawTagName); | ||
// console.error('22222222222222222222', match); | ||
if (currentParent.rawTagName === 'a' && match[2] === 'a') { | ||
stack.pop(); | ||
currentParent = arr_back(stack); | ||
} | ||
const tagEndPos = kMarkupPattern.lastIndex; | ||
@@ -1004,0 +1010,0 @@ const tagStartPos = tagEndPos - match[0].length; |
@@ -1017,3 +1017,3 @@ var __extends = (this && this.__extends) || (function () { | ||
if (this.rawAttrs) { | ||
var re = /\b([a-z][a-z0-9-_:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
var re = /([a-z()#][a-z0-9-_:()#]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
var match = void 0; | ||
@@ -1378,2 +1378,8 @@ while ((match = re.exec(this.rawAttrs))) { | ||
} | ||
// console.error('111111111111111111', currentParent.rawTagName); | ||
// console.error('22222222222222222222', match); | ||
if (currentParent.rawTagName === 'a' && match[2] === 'a') { | ||
stack.pop(); | ||
currentParent = (0, back_1.default)(stack); | ||
} | ||
var tagEndPos_1 = kMarkupPattern.lastIndex; | ||
@@ -1380,0 +1386,0 @@ var tagStartPos_1 = tagEndPos_1 - match[0].length; |
@@ -771,3 +771,3 @@ "use strict"; | ||
if (this.rawAttrs) { | ||
var re = /\b([a-z][a-z0-9-_:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
var re = /([a-z()#][a-z0-9-_:()#]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/ig; | ||
var match = void 0; | ||
@@ -1132,2 +1132,8 @@ while ((match = re.exec(this.rawAttrs))) { | ||
} | ||
// console.error('111111111111111111', currentParent.rawTagName); | ||
// console.error('22222222222222222222', match); | ||
if (currentParent.rawTagName === 'a' && match[2] === 'a') { | ||
stack.pop(); | ||
currentParent = (0, back_1.default)(stack); | ||
} | ||
var tagEndPos_1 = kMarkupPattern.lastIndex; | ||
@@ -1134,0 +1140,0 @@ var tagStartPos_1 = tagEndPos_1 - match[0].length; |
{ | ||
"name": "node-html-parser", | ||
"version": "4.1.3", | ||
"version": "4.1.4", | ||
"description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
191123
5131