From 4abfc0347a03e28eb954817bd84bf832840b6305 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 21 Jun 2024 20:49:23 -0300 Subject: data: withParsedCommentaryEntries: dateKind, secondDate --- src/util/wiki-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index f64902b7..33db526b 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -94,7 +94,7 @@ const dateRegex = groupName => String.raw`(?<${groupName}>[a-zA-Z]+ [0-9]{1,2}, [0-9]{4,4}|[0-9]{1,2} [^,]*[0-9]{4,4}|[0-9]{1,4}[-/][0-9]{1,4}[-/][0-9]{1,4})`; const commentaryRegexRaw = - String.raw`^(?.+?)(?:\|(?.+))?:<\/i>(?: \((?(?:.*?(?=,|\)[^)]*$))*?)(?:,? ?${dateRegex('date')}(?: (?captured|accessed) ${dateRegex('accessDate')})?)?\))?`; + String.raw`^(?.+?)(?:\|(?.+))?:<\/i>(?: \((?(?:.*?(?=,|\)[^)]*$))*?)(?:,? ?(?:(?sometime|throughout|around) )?${dateRegex('date')}(?: ?- ?${dateRegex('secondDate')})?(?: (?captured|accessed) ${dateRegex('accessDate')})?)?\))?`; export const commentaryRegexCaseInsensitive = new RegExp(commentaryRegexRaw, 'gmi'); export const commentaryRegexCaseSensitive = -- cgit 1.3.0-6-gf8a5