(match)
| 7531 | } |
| 7532 | |
| 7533 | function handleStartTag (match) { |
| 7534 | var tagName = match.tagName; |
| 7535 | var unarySlash = match.unarySlash; |
| 7536 | |
| 7537 | if (expectHTML) { |
| 7538 | if (lastTag === 'p' && isNonPhrasingTag(tagName)) { |
| 7539 | parseEndTag(lastTag); |
| 7540 | } |
| 7541 | if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) { |
| 7542 | parseEndTag(tagName); |
| 7543 | } |
| 7544 | } |
| 7545 | |
| 7546 | var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash; |
| 7547 | |
| 7548 | var l = match.attrs.length; |
| 7549 | var attrs = new Array(l); |
| 7550 | for (var i = 0; i < l; i++) { |
| 7551 | var args = match.attrs[i]; |
| 7552 | // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778 |
| 7553 | if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) { |
| 7554 | if (args[3] === '') { delete args[3]; } |
| 7555 | if (args[4] === '') { delete args[4]; } |
| 7556 | if (args[5] === '') { delete args[5]; } |
| 7557 | } |
| 7558 | var value = args[3] || args[4] || args[5] || ''; |
| 7559 | attrs[i] = { |
| 7560 | name: args[1], |
| 7561 | value: decodeAttr( |
| 7562 | value, |
| 7563 | options.shouldDecodeNewlines |
| 7564 | ) |
| 7565 | }; |
| 7566 | } |
| 7567 | |
| 7568 | if (!unary) { |
| 7569 | stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs }); |
| 7570 | lastTag = tagName; |
| 7571 | } |
| 7572 | |
| 7573 | if (options.start) { |
| 7574 | options.start(tagName, attrs, unary, match.start, match.end); |
| 7575 | } |
| 7576 | } |
| 7577 | |
| 7578 | function parseEndTag (tagName, start, end) { |
| 7579 | var pos, lowerCasedTagName; |
no test coverage detected