Skip to content

Commit

Permalink
Merge pull request #1126 from pjkaufman/master
Browse files Browse the repository at this point in the history
Fix: Live Preview YAML Update Occasional Breaks Frontmatter
  • Loading branch information
pjkaufman authored Jul 13, 2024
2 parents b83094d + bdc6cab commit d027848
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 @@ -505,7 +505,7 @@ export default class LinterPlugin extends Plugin {
isBeforeStartIndex = curText.length < startingIndex;
if (isBeforeStartIndex && curText.length + value.length >= startingIndex && type == DiffMatchPatch.DIFF_INSERT) {
const valueIndexStart = startingIndex - curText.length;
curText = value.substring(0, valueIndexStart);
curText += value.substring(0, valueIndexStart);
value = value.substring(valueIndexStart);
isBeforeStartIndex = false;
}
Expand Down

0 comments on commit d027848

Please sign in to comment.