Replace deprecated String#substr with String#slice (#8314)
This commit is contained in:
parent
0e68c16a90
commit
c35fc169f5
17 changed files with 37 additions and 37 deletions
|
@ -281,7 +281,7 @@ export function toggleInlineFormat(range: Range, prefix: string, suffix = prefix
|
|||
if (isFormatted) {
|
||||
// remove prefix and suffix formatting string
|
||||
const partWithoutPrefix = parts[base].serialize();
|
||||
partWithoutPrefix.text = partWithoutPrefix.text.substr(prefix.length);
|
||||
partWithoutPrefix.text = partWithoutPrefix.text.slice(prefix.length);
|
||||
parts[base] = partCreator.deserializePart(partWithoutPrefix);
|
||||
|
||||
const partWithoutSuffix = parts[index - 1].serialize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue