We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd68979 commit f57d8d4Copy full SHA for f57d8d4
apps/site/next-data/providers/blogData.ts
@@ -10,8 +10,8 @@ const blogPosts = cache(() =>
10
);
11
12
const extractVersionFromTitle = (title: string): string | null => {
13
- const match = title.match(/v(\d+\.\d+\.\d+)/);
14
- return match ? match[1] : null;
+ const versionMatch = title.match(/v?(\d+\.\d+\.\d+(-[\w.-]+)?(\+[\w.-]+)?)/);
+ return versionMatch && semver.valid(versionMatch[0]) ? versionMatch[0] : null;
15
};
16
17
export const provideBlogPosts = cache(
0 commit comments