Fix: Replace ES2018 regex flag with compatible pattern
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -88,7 +88,7 @@ function parseMarkdownPost(filename: string, content: string): BlogPost | null {
|
|||||||
// Extract excerpt from introduction or meta description
|
// Extract excerpt from introduction or meta description
|
||||||
let excerpt = metaDescription;
|
let excerpt = metaDescription;
|
||||||
if (!excerpt) {
|
if (!excerpt) {
|
||||||
const introMatch = content.match(/## Einführung\s*\n\n(.+?)(?:\n\n|$)/s);
|
const introMatch = content.match(/## Einführung\s*\n\n([\s\S]+?)(?:\n\n|$)/);
|
||||||
if (introMatch) {
|
if (introMatch) {
|
||||||
excerpt = introMatch[1].trim().slice(0, 200) + '...';
|
excerpt = introMatch[1].trim().slice(0, 200) + '...';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user