Skip to content

Commit

Permalink
Allow passthrough of irrational ranges with page-range-format="minimal"
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Jul 16, 2019
1 parent 98a9b8d commit 8139c07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/util_page.js
Expand Up @@ -75,9 +75,11 @@ CSL.Util.PageRangeMangler.getFunction = function (state, rangeType) {
minimize = function (lst, minchars, isyear) {
len = lst.length;
for (var i = 1, ilen = lst.length; i < ilen; i += 2) {
lst[i][3] = minimize_internal(lst[i][1], lst[i][3], minchars, isyear);
if (lst[i][2].slice(1) === lst[i][0]) {
lst[i][2] = range_delimiter;
if ("object" === typeof lst[i]) {
lst[i][3] = minimize_internal(lst[i][1], lst[i][3], minchars, isyear);
if (lst[i][2].slice(1) === lst[i][0]) {
lst[i][2] = range_delimiter;
}
}
}
return stringify(lst);
Expand Down

0 comments on commit 8139c07

Please sign in to comment.