Skip to content

Commit

Permalink
fix: take blockId into consideration when calling 'toggleCrease'
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcain committed Dec 29, 2022
1 parent ce3c85b commit f854847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ export default class CreasesPlugin extends Plugin {
if (hasCrease(line)) {
// Remove crease
const from = { line: lineNum, ch: 0 };
const to = { line: lineNum, ch: line.length };
const to = { line: lineNum, ch: this.getFoldTargetPosition(line) };
const lineWithoutCrease = line.replace(CREASE_REGEX, "").trimEnd();
editor.replaceRange(lineWithoutCrease, from, to);
} else {
Expand Down

0 comments on commit f854847

Please sign in to comment.