Skip to content

Commit 99bc7ef

Browse files
committed
fix: modify heading regex pattern to change optional capture of whitespace to match one or more
1 parent 7c55eb8 commit 99bc7ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/formatters/helpers/getEndOfSection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function getMarkdownHeadings(bodyLines: string[]): Heading[] {
1212
const headers: Heading[] = [];
1313

1414
bodyLines.forEach((line, index) => {
15-
const match = line.match(/^(#+\s)[\s]?(.*)$/);
15+
const match = line.match(/^(#+)[\s]+(.*)$/);
1616

1717
if (!match) return;
1818

0 commit comments

Comments
 (0)