Skip to content

Commit 23d2497

Browse files
committed
chore: fix tools/update-docs.ts
1 parent fabc224 commit 23d2497

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/update-docs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ const ROOT = path.resolve(__dirname, "../docs/rules")
1616
function pickSince(content: string): string | null | Promise<string> {
1717
const fileIntro = /^---\n(?<content>.*\n)+---\n*/u.exec(content)
1818
if (fileIntro) {
19-
const since = /since: "?(?<version>v\d+\.\d+\.\d+)"?/u.exec(
20-
fileIntro.groups!.content,
21-
)
19+
const since =
20+
/since: "?(?<version>v\d+\.\d+\.\d+(?:[^\d\n"][^\n"]*)?)"?/u.exec(
21+
fileIntro.groups!.content,
22+
)
2223
if (since) {
2324
return since.groups!.version
2425
}

0 commit comments

Comments
 (0)