Skip to content

Commit 96b833b

Browse files
ChrisMiaoMiaoyyx990803
authored andcommitted
refactor: remove unnecessary code in html-parser.js (#8359)
1 parent 6eaf56e commit 96b833b

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/compiler/parser/html-parser.js

-11
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ const doctype = /^<!DOCTYPE [^>]+>/i
2626
const comment = /^<!\--/
2727
const conditionalComment = /^<!\[/
2828

29-
let IS_REGEX_CAPTURING_BROKEN = false
30-
'x'.replace(/x(.)?/g, function (m, g) {
31-
IS_REGEX_CAPTURING_BROKEN = g === ''
32-
})
33-
3429
// Special Elements (can contain anything)
3530
export const isPlainTextElement = makeMap('script,style,textarea', true)
3631
const reCache = {}
@@ -228,12 +223,6 @@ export function parseHTML (html, options) {
228223
const attrs = new Array(l)
229224
for (let i = 0; i < l; i++) {
230225
const args = match.attrs[i]
231-
// hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
232-
if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
233-
if (args[3] === '') { delete args[3] }
234-
if (args[4] === '') { delete args[4] }
235-
if (args[5] === '') { delete args[5] }
236-
}
237226
const value = args[3] || args[4] || args[5] || ''
238227
const shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
239228
? options.shouldDecodeNewlinesForHref

0 commit comments

Comments
 (0)