Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Fix ignore title comment matching start of the TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Sep 23, 2020
1 parent dc78073 commit c74195a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class MarkdownTocTools {

for (let index = 0; index < doc.lineCount; index++) {
let lineText = doc.lineAt(index).text;
if ((start === null) && (lineText.match(REGEXP_TOC_START))) {
if (start === null && lineText.match(REGEXP_TOC_START) && !lineText.match(REGEXP_IGNORE_TITLE)) {
start = new Position(index, 0);
} else if (lineText.match(REGEXP_TOC_STOP)) {
stop = new Position(index, lineText.length);
Expand Down

0 comments on commit c74195a

Please sign in to comment.