Skip to content

Commit

Permalink
🐛 Fix body trimming title
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 22, 2022
1 parent 23e9dae commit c59ba6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const parseNoteFile = async (dirName: string, year: string, file: string): Promi
? attributes.description
: "summary" in attributes && typeof attributes.summary === "string"
? attributes.summary
: body.substring(body.indexOf(title) + 1)?.trim();
: body.substring(body.indexOf(title))?.trim();

return {
slug: file,
Expand Down

0 comments on commit c59ba6e

Please sign in to comment.