Skip to content

Commit

Permalink
fix: modify heading regex pattern to change optional capture of white…
Browse files Browse the repository at this point in the history
…space to match one or more
  • Loading branch information
chhoumann committed Nov 3, 2024
1 parent 7c55eb8 commit 99bc7ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formatters/helpers/getEndOfSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function getMarkdownHeadings(bodyLines: string[]): Heading[] {
const headers: Heading[] = [];

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

if (!match) return;

Expand Down

0 comments on commit 99bc7ef

Please sign in to comment.