|
|
@@ -825,9 +825,9 @@ function parseAttribute(
|
|
|
context,
|
|
|
ErrorCodes.X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END
|
|
|
)
|
|
|
- content = content.substr(1)
|
|
|
+ content = content.slice(1)
|
|
|
} else {
|
|
|
- content = content.substr(1, content.length - 2)
|
|
|
+ content = content.slice(1, content.length - 1)
|
|
|
}
|
|
|
} else if (isSlot) {
|
|
|
// #1241 special case for v-slot: vuetify relies extensively on slot
|
|
|
@@ -855,7 +855,7 @@ function parseAttribute(
|
|
|
valueLoc.source = valueLoc.source.slice(1, -1)
|
|
|
}
|
|
|
|
|
|
- const modifiers = match[3] ? match[3].substr(1).split('.') : []
|
|
|
+ const modifiers = match[3] ? match[3].slice(1).split('.') : []
|
|
|
if (isPropShorthand) modifiers.push('prop')
|
|
|
|
|
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
|
@@ -1167,7 +1167,7 @@ function isEnd(
|
|
|
function startsWithEndTagOpen(source: string, tag: string): boolean {
|
|
|
return (
|
|
|
startsWith(source, '</') &&
|
|
|
- source.substr(2, tag.length).toLowerCase() === tag.toLowerCase() &&
|
|
|
+ source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
|
|
|
/[\t\r\n\f />]/.test(source[2 + tag.length] || '>')
|
|
|
)
|
|
|
}
|