From 5536f8d2bd08ddac9074b9df05b7d205273835e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Wed, 20 Dec 2023 12:52:16 +0200 Subject: [PATCH] Citation dialog: match year-ranges (e.g. 1992-2002) for search Instead of as page locators --- chrome/content/zotero/integration/quickFormat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 634d963fce..f6f3ff35b6 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -27,8 +27,8 @@ Services.scriptloader.loadSubScript("chrome://zotero/content/customElements.js", var Zotero_QuickFormat = new function () { const pixelRe = /^([0-9]+)px$/ - const specifiedLocatorRe = /^(?:,? *(p{1,2})(?:\. *| *)|:)([0-9\-]+) *$/; - const yearRe = /,? *([0-9]+) *(B[. ]*C[. ]*(?:E[. ]*)?|A[. ]*D[. ]*|C[. ]*E[. ]*)?$/i; + const specifiedLocatorRe = /^(?:,? *(p{1,2})(?:\. *| *)|:)([0-9\-–]+) *$/; + const yearRe = /,? *([0-9]+(?: *[-–] *[0-9]+)?) *(B[. ]*C[. ]*(?:E[. ]*)?|A[. ]*D[. ]*|C[. ]*E[. ]*)?$/i; const locatorRe = / (?:,? *(p{0,2})\.?|(\:)) *([0-9\-–]+)$/i; const creatorSplitRe = /(?:,| *(?:and|\&)) +/; const charRe = /[\w\u007F-\uFFFF]/;