Skip to content

Commit

Permalink
Merge pull request #8 from rikuson/multiple-newline-code
Browse files Browse the repository at this point in the history
Update regexp for multiple newline code
  • Loading branch information
K-Sato1995 authored Dec 14, 2020
2 parents fb1551a + d9bc200 commit a3b025c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const extractHeadingsFromMd = (
lowestTargetHeadings: number
): RegExpMatchArray | null => {
const headingRegex = new RegExp(
`^#{${highestTargetHeadings},${lowestTargetHeadings}}\\s.+\\n`,
`^#{${highestTargetHeadings},${lowestTargetHeadings}}\\s.+(\\n|\\r|\\r\\n)`,
"gm"
);
return markdownText.match(headingRegex);
Expand Down

0 comments on commit a3b025c

Please sign in to comment.