Citation dialog: match year-ranges (e.g. 1992-2002) for search

Instead of as page locators
This commit is contained in:
Adomas Venčkauskas 2023-12-20 12:52:16 +02:00
parent b31f66ddbd
commit 5536f8d2bd

View file

@ -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]/;