Skip to content

Commit

Permalink
Improve matching logic of the selected section (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanzhong authored Feb 25, 2023
1 parent 5cc1f2d commit 82fa163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CoreEditor/src/modules/toc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function getTableOfContents() {
});

const baseLevel = results.reduce((acc, cur) => Math.min(acc, cur.level), 6);
const selection = state.selection.main.anchor;
const selection = state.selection.main.head;

for (let index = 0; index < results.length; ++index) {
const item = results[index];
Expand Down

0 comments on commit 82fa163

Please sign in to comment.