mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 05:38:06 +00:00
revert: use wrap() back as it providing detectWord option
This commit is contained in:
parent
75ec4828cd
commit
23e0d87546
1 changed files with 3 additions and 5 deletions
|
|
@ -238,7 +238,7 @@ export class Formatter {
|
|||
}
|
||||
/** Run only when tidier formatting is switched off. */
|
||||
toggleInlineDelim() {
|
||||
let { curRange, delimStr, tagStr } = this.state,
|
||||
let { curRange, delimStr } = this.state,
|
||||
delimLen = delimStr.length,
|
||||
selectedStrWithOverlappedEdge = this.doc.sliceString(curRange.from - delimLen, curRange.to + delimLen),
|
||||
selectedStr = selectedStrWithOverlappedEdge.slice(delimLen, -delimLen);
|
||||
|
|
@ -253,10 +253,8 @@ export class Formatter {
|
|||
{ from: curRange.to, to: curRange.to + delimLen }
|
||||
]);
|
||||
} else {
|
||||
this.state.pushChange([
|
||||
{ from: curRange.from, insert: delimStr + (tagStr ?? "") },
|
||||
{ from: curRange.to, insert: delimStr }
|
||||
]);
|
||||
let detectWord = false;
|
||||
this.wrap(detectWord);
|
||||
}
|
||||
}
|
||||
addBlockTag(block: { start: number, end: number }) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue