Remove useless u flags in regular expressions (#18509)
This commit is contained in:
1 parent
97f2e81d06
commit
c9eb4bcd9e
131 files changed
+388
-405
No files matched your search
@@ -44,11 +44,11 @@ export default function llmsTxtPlugin(context) {
|
||||
let title = entry.name.replace(".md", "");
|
||||
let description = "";
|
||||
|
||||
const frontmatterMatch = content.match(/^---\n(.*?)\n---/su);
|
||||
const frontmatterMatch = content.match(/^---\n(.*?)\n---/s);
|
||||
if (frontmatterMatch) {
|
||||
const titleMatch = frontmatterMatch[1].match(/title:\s*(.+)/u);
|
||||
const titleMatch = frontmatterMatch[1].match(/title:\s*(.+)/);
|
||||
const descriptionMatch =
|
||||
frontmatterMatch[1].match(/description:\s*(.+)/u);
|
||||
frontmatterMatch[1].match(/description:\s*(.+)/);
|
||||
|
||||
if (titleMatch) {
|
||||
title = titleMatch[1].trim();
|
||||
|
||||
Reference in new issue
Block a user