1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Only match data selectors if they are in a new line #711

This commit is contained in:
Patrik J. Braun 2023-09-11 16:58:10 +02:00
parent 8cc73f2780
commit 5a5aec8919

View File

@ -51,7 +51,7 @@ export class BlogService {
dates.sort(); dates.sort();
const splitterRgx = new RegExp(/<!--\s*@pg-date:?\s*\d{4}-\d{1,2}-\d{1,2}\s*-->/, 'gi'); const splitterRgx = new RegExp(/^\s*<!--\s*@pg-date:?\s*\d{4}-\d{1,2}-\d{1,2}\s*-->/, 'gi');
const dateRgx = new RegExp(/\d{4}-\d{1,2}-\d{1,2}/); const dateRgx = new RegExp(/\d{4}-\d{1,2}-\d{1,2}/);
const ret: GroupedMarkdown[] = []; const ret: GroupedMarkdown[] = [];