Skip to content

Commit

Permalink
fix: headings
Browse files Browse the repository at this point in the history
  • Loading branch information
pregno committed Nov 25, 2024
1 parent b36b05d commit 478c247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/docs/src/app/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type MarkdownHeading = {
};

const extractHeadingsFromMdx = (raw: string): MarkdownHeading[] => {
const regXHeader = /#{1,6}.+/g;
const regXHeader = /#{1,6}\s.+/g;

return (
raw.match(regXHeader)?.map((item) => {
Expand Down

0 comments on commit 478c247

Please sign in to comment.