Skip to content

Commit

Permalink
Fixed title, somehow
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Aug 11, 2024
1 parent fd8eb1d commit 71a74a8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export function readDefaultsFromReadme() {
?.match(/src\s*=(.+)?\/>/)?.[1]
?.replaceAll(/^['"]|['"]$/g, ""),
title: async () =>
/^(?:# |<h1\s+align="center">)(.*?)(?:<\/h1>)?$/i
.exec(await readme())?.[1]
?.trim()
.replace(/<[^>]+(?:>|$)/g, ""),
(/^<h1\s+align="center">(.+)<\/h1>/.exec(await readme()) ||

Check failure on line 18 in src/shared/options/createOptionDefaults/readDefaultsFromReadme.ts

View workflow job for this annotation

GitHub Actions / Lint

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator
/^# (.+)/.exec(await readme()))?.[1],
};
}

0 comments on commit 71a74a8

Please sign in to comment.