commit 282655e41aaa1f97d0053f81a612c97908439df5 parent c60cb6f76b1669c36661ba8dfa3f6acbe3c00c39 Author: Dan Stillman <dstillman@zotero.org> Date: Wed, 10 Mar 2010 05:35:49 +0000 Parse spaces and em dashes in page ranges Diffstat:
| M | chrome/content/zotero/xpcom/utilities.js | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -524,7 +524,7 @@ Zotero.Utilities.prototype.md5 = function(strOrFile, base64) { * @return {Integer[]} Start and end pages */ Zotero.Utilities.prototype.getPageRange = function(pages) { - const pageRangeRegexp = /^\s*([0-9]+)-([0-9]+)\s*$/ + const pageRangeRegexp = /^\s*([0-9]+) ?[-\u2013] ?([0-9]+)\s*$/ var pageNumbers; var m = pageRangeRegexp.exec(pages);