@citestyle/styles 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ama.js +3 -0
- package/apa.js +6 -3
- package/chicago-author-date.js +30 -27
- package/harvard.js +4 -1
- package/ieee.js +4 -1
- package/mla.js +13 -10
- package/nature.js +79 -82
- package/package.json +2 -2
- package/science.js +4 -1
- package/vancouver.js +3 -0
package/ama.js
CHANGED
|
@@ -1096,7 +1096,10 @@ function _normalizePunctuation(str) {
|
|
|
1096
1096
|
if (!str) return ''
|
|
1097
1097
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1098
1098
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1099
|
+
const Q = "[”’]"
|
|
1099
1100
|
return str
|
|
1101
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
1102
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
1100
1103
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1101
1104
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1102
1105
|
.replace(/ +/g, ' ')
|
package/apa.js
CHANGED
|
@@ -1734,11 +1734,11 @@ function macro_title_short(item, ctx) {
|
|
|
1734
1734
|
let _ch225 = ''
|
|
1735
1735
|
if (((item["reviewed-genre"] != null && item["reviewed-genre"] !== '') && (item.title != null && item.title !== ''))) {
|
|
1736
1736
|
const _v226 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1737
|
-
_ch225 = ((applyTextCase(_v226, "title") ? '“' + applyTextCase(_v226, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v226, "title") ? '“' + applyTextCase(_v226, "title") + '”' : '') + '\uE022' : '')
|
|
1737
|
+
_ch225 = ((applyTextCase(_v226, "title") ? (T['open-quote'] || '“') + applyTextCase(_v226, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v226, "title") ? (T['open-quote'] || '“') + applyTextCase(_v226, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1738
1738
|
}
|
|
1739
1739
|
else if (((item["reviewed-title"] != null && item["reviewed-title"] !== '') && (item.title != null && item.title !== ''))) {
|
|
1740
1740
|
const _v227 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1741
|
-
_ch225 = ((applyTextCase(_v227, "title") ? '“' + applyTextCase(_v227, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v227, "title") ? '“' + applyTextCase(_v227, "title") + '”' : '') + '\uE022' : '')
|
|
1741
|
+
_ch225 = ((applyTextCase(_v227, "title") ? (T['open-quote'] || '“') + applyTextCase(_v227, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v227, "title") ? (T['open-quote'] || '“') + applyTextCase(_v227, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1742
1742
|
}
|
|
1743
1743
|
else {
|
|
1744
1744
|
const _v228 = macro_description_short(item, ctx)
|
|
@@ -1760,7 +1760,7 @@ function macro_title_short(item, ctx) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
1762
1762
|
const _v232 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1763
|
-
_ch224 = ((applyTextCase(_v232, "title") ? '“' + applyTextCase(_v232, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v232, "title") ? '“' + applyTextCase(_v232, "title") + '”' : '') + '\uE022' : '')
|
|
1763
|
+
_ch224 = ((applyTextCase(_v232, "title") ? (T['open-quote'] || '“') + applyTextCase(_v232, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v232, "title") ? (T['open-quote'] || '“') + applyTextCase(_v232, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1764
1764
|
}
|
|
1765
1765
|
else {
|
|
1766
1766
|
const _v233 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -3651,7 +3651,10 @@ function _normalizePunctuation(str) {
|
|
|
3651
3651
|
if (!str) return ''
|
|
3652
3652
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
3653
3653
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
3654
|
+
const Q = "[”’]"
|
|
3654
3655
|
return str
|
|
3656
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
3657
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
3655
3658
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
3656
3659
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
3657
3660
|
.replace(/ +/g, ' ')
|
package/chicago-author-date.js
CHANGED
|
@@ -2263,11 +2263,11 @@ function macro_title_short(item, ctx) {
|
|
|
2263
2263
|
let _ch344 = ''
|
|
2264
2264
|
if (((item["reviewed-genre"] != null && item["reviewed-genre"] !== '') && (item.title != null && item.title !== ''))) {
|
|
2265
2265
|
const _v345 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2266
|
-
_ch344 = ((applyTextCase(_v345, "title") ? '“' + applyTextCase(_v345, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v345, "title") ? '“' + applyTextCase(_v345, "title") + '”' : '') + '\uE022' : '')
|
|
2266
|
+
_ch344 = ((applyTextCase(_v345, "title") ? (T['open-quote'] || '“') + applyTextCase(_v345, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v345, "title") ? (T['open-quote'] || '“') + applyTextCase(_v345, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2267
2267
|
}
|
|
2268
2268
|
else if (((item["reviewed-genre"] != null && item["reviewed-genre"] !== '') && (item["reviewed-title"] != null && item["reviewed-title"] !== '') && (item.title != null && item.title !== ''))) {
|
|
2269
2269
|
const _v346 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2270
|
-
_ch344 = ((applyTextCase(_v346, "title") ? '“' + applyTextCase(_v346, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v346, "title") ? '“' + applyTextCase(_v346, "title") + '”' : '') + '\uE022' : '')
|
|
2270
|
+
_ch344 = ((applyTextCase(_v346, "title") ? (T['open-quote'] || '“') + applyTextCase(_v346, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v346, "title") ? (T['open-quote'] || '“') + applyTextCase(_v346, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2271
2271
|
}
|
|
2272
2272
|
else {
|
|
2273
2273
|
const _v347 = macro_description_short(item, ctx)
|
|
@@ -2349,29 +2349,29 @@ function macro_title_part(item, ctx) {
|
|
|
2349
2349
|
}
|
|
2350
2350
|
else if ((item.type === "entry-encyclopedia" && (item.author != null && item.author !== '') && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2351
2351
|
const _v370 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2352
|
-
_ch365 = ((applyTextCase(_v370, "title") ? '“' + applyTextCase(_v370, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v370, "title") ? '“' + applyTextCase(_v370, "title") + '”' : '') + '\uE022' : '')
|
|
2352
|
+
_ch365 = ((applyTextCase(_v370, "title") ? (T['open-quote'] || '“') + applyTextCase(_v370, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v370, "title") ? (T['open-quote'] || '“') + applyTextCase(_v370, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2353
2353
|
}
|
|
2354
2354
|
else if ((item.type === "entry-dictionary" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2355
2355
|
const _v371 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2356
|
-
_ch365 = ((stripNocaseSpans(_v371) ? '“' + stripNocaseSpans(_v371) + '”' : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v371) ? '“' + stripNocaseSpans(_v371) + '”' : '') + '\uE022' : '')
|
|
2356
|
+
_ch365 = ((stripNocaseSpans(_v371) ? (T['open-quote'] || '“') + stripNocaseSpans(_v371) + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v371) ? (T['open-quote'] || '“') + stripNocaseSpans(_v371) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2357
2357
|
}
|
|
2358
2358
|
else if ((item.type === "entry-encyclopedia" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2359
2359
|
const _v372 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2360
|
-
_ch365 = ((stripNocaseSpans(_v372) ? '“' + stripNocaseSpans(_v372) + '”' : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v372) ? '“' + stripNocaseSpans(_v372) + '”' : '') + '\uE022' : '')
|
|
2360
|
+
_ch365 = ((stripNocaseSpans(_v372) ? (T['open-quote'] || '“') + stripNocaseSpans(_v372) + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v372) ? (T['open-quote'] || '“') + stripNocaseSpans(_v372) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2361
2361
|
}
|
|
2362
2362
|
else if (item.type === "post") {
|
|
2363
2363
|
const _v373 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2364
|
-
_ch365 = ((stripNocaseSpans(_v373) ? '“' + stripNocaseSpans(_v373) + '”' : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v373) ? '“' + stripNocaseSpans(_v373) + '”' : '') + '\uE022' : '')
|
|
2364
|
+
_ch365 = ((stripNocaseSpans(_v373) ? (T['open-quote'] || '“') + stripNocaseSpans(_v373) + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (stripNocaseSpans(_v373) ? (T['open-quote'] || '“') + stripNocaseSpans(_v373) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2365
2365
|
}
|
|
2366
2366
|
else if (item.type === "webpage") {
|
|
2367
2367
|
const _v374 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2368
|
-
_ch365 = ((applyTextCase(_v374, "title") ? '“' + applyTextCase(_v374, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v374, "title") ? '“' + applyTextCase(_v374, "title") + '”' : '') + '\uE022' : '')
|
|
2368
|
+
_ch365 = ((applyTextCase(_v374, "title") ? (T['open-quote'] || '“') + applyTextCase(_v374, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v374, "title") ? (T['open-quote'] || '“') + applyTextCase(_v374, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2369
2369
|
}
|
|
2370
2370
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
2371
2371
|
let _ch375 = ''
|
|
2372
2372
|
if ((item.type === "article-journal" || item.type === "article-magazine" || item.type === "article-newspaper" || item.type === "periodical" || item.type === "post-weblog" || item.type === "review" || item.type === "review-book")) {
|
|
2373
2373
|
const _v376 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2374
|
-
_ch375 = ((applyTextCase(_v376, "title") ? '“' + applyTextCase(_v376, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v376, "title") ? '“' + applyTextCase(_v376, "title") + '”' : '') + '\uE022' : '')
|
|
2374
|
+
_ch375 = ((applyTextCase(_v376, "title") ? (T['open-quote'] || '“') + applyTextCase(_v376, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v376, "title") ? (T['open-quote'] || '“') + applyTextCase(_v376, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2375
2375
|
}
|
|
2376
2376
|
else if (((item["collection-editor"] != null && item["collection-editor"] !== '') || (item.compiler != null && item.compiler !== '') || (item.editor != null && item.editor !== '') || (item["editorial-director"] != null && item["editorial-director"] !== ''))) {
|
|
2377
2377
|
const _v377 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
@@ -2379,7 +2379,7 @@ function macro_title_part(item, ctx) {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
else if ((item.type === "interview" || item.type === "paper-conference")) {
|
|
2381
2381
|
const _v378 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2382
|
-
_ch375 = ((applyTextCase(_v378, "title") ? '“' + applyTextCase(_v378, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v378, "title") ? '“' + applyTextCase(_v378, "title") + '”' : '') + '\uE022' : '')
|
|
2382
|
+
_ch375 = ((applyTextCase(_v378, "title") ? (T['open-quote'] || '“') + applyTextCase(_v378, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v378, "title") ? (T['open-quote'] || '“') + applyTextCase(_v378, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2383
2383
|
}
|
|
2384
2384
|
else {
|
|
2385
2385
|
const _v379 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
@@ -2389,7 +2389,7 @@ function macro_title_part(item, ctx) {
|
|
|
2389
2389
|
}
|
|
2390
2390
|
else if ((item.type === "article" || item.type === "dataset" || item.type === "document" || item.type === "interview" || item.type === "manuscript" || item.type === "paper-conference" || item.type === "personal_communication" || item.type === "speech" || item.type === "thesis" || item.type === "webpage")) {
|
|
2391
2391
|
const _v380 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
2392
|
-
_ch365 = ((applyTextCase(_v380, "title") ? '“' + applyTextCase(_v380, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v380, "title") ? '“' + applyTextCase(_v380, "title") + '”' : '') + '\uE022' : '')
|
|
2392
|
+
_ch365 = ((applyTextCase(_v380, "title") ? (T['open-quote'] || '“') + applyTextCase(_v380, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v380, "title") ? (T['open-quote'] || '“') + applyTextCase(_v380, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2393
2393
|
}
|
|
2394
2394
|
else {
|
|
2395
2395
|
const _v381 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
@@ -2418,27 +2418,27 @@ function macro_title_primary(item, ctx) {
|
|
|
2418
2418
|
}
|
|
2419
2419
|
else if ((item.type === "entry-encyclopedia" && (item.author != null && item.author !== '') && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2420
2420
|
const _v387 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2421
|
-
_ch382 = ((applyTextCase(_v387, "title") ? '“' + applyTextCase(_v387, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v387, "title") ? '“' + applyTextCase(_v387, "title") + '”' : '') + '\uE022' : '')
|
|
2421
|
+
_ch382 = ((applyTextCase(_v387, "title") ? (T['open-quote'] || '“') + applyTextCase(_v387, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v387, "title") ? (T['open-quote'] || '“') + applyTextCase(_v387, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2422
2422
|
}
|
|
2423
2423
|
else if ((item.type === "entry-dictionary" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2424
2424
|
const _v388 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2425
|
-
_ch382 = ((stripNocaseSpans(_v388) ? '“' + stripNocaseSpans(_v388) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v388) ? '“' + stripNocaseSpans(_v388) + '”' : '') + '\uE022' : '')
|
|
2425
|
+
_ch382 = ((stripNocaseSpans(_v388) ? (T['open-quote'] || '“') + stripNocaseSpans(_v388) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v388) ? (T['open-quote'] || '“') + stripNocaseSpans(_v388) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2426
2426
|
}
|
|
2427
2427
|
else if ((item.type === "entry-encyclopedia" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2428
2428
|
const _v389 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2429
|
-
_ch382 = ((stripNocaseSpans(_v389) ? '“' + stripNocaseSpans(_v389) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v389) ? '“' + stripNocaseSpans(_v389) + '”' : '') + '\uE022' : '')
|
|
2429
|
+
_ch382 = ((stripNocaseSpans(_v389) ? (T['open-quote'] || '“') + stripNocaseSpans(_v389) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v389) ? (T['open-quote'] || '“') + stripNocaseSpans(_v389) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2430
2430
|
}
|
|
2431
2431
|
else if (item.type === "post") {
|
|
2432
2432
|
const _v390 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2433
|
-
_ch382 = ((stripNocaseSpans(_v390) ? '“' + stripNocaseSpans(_v390) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v390) ? '“' + stripNocaseSpans(_v390) + '”' : '') + '\uE022' : '')
|
|
2433
|
+
_ch382 = ((stripNocaseSpans(_v390) ? (T['open-quote'] || '“') + stripNocaseSpans(_v390) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v390) ? (T['open-quote'] || '“') + stripNocaseSpans(_v390) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2434
2434
|
}
|
|
2435
2435
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
2436
2436
|
const _v391 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2437
|
-
_ch382 = ((applyTextCase(_v391, "title") ? '“' + applyTextCase(_v391, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v391, "title") ? '“' + applyTextCase(_v391, "title") + '”' : '') + '\uE022' : '')
|
|
2437
|
+
_ch382 = ((applyTextCase(_v391, "title") ? (T['open-quote'] || '“') + applyTextCase(_v391, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v391, "title") ? (T['open-quote'] || '“') + applyTextCase(_v391, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2438
2438
|
}
|
|
2439
2439
|
else if ((item.type === "article" || item.type === "dataset" || item.type === "document" || item.type === "interview" || item.type === "manuscript" || item.type === "paper-conference" || item.type === "personal_communication" || item.type === "speech" || item.type === "thesis" || item.type === "webpage")) {
|
|
2440
2440
|
const _v392 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2441
|
-
_ch382 = ((applyTextCase(_v392, "title") ? '“' + applyTextCase(_v392, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v392, "title") ? '“' + applyTextCase(_v392, "title") + '”' : '') + '\uE022' : '')
|
|
2441
|
+
_ch382 = ((applyTextCase(_v392, "title") ? (T['open-quote'] || '“') + applyTextCase(_v392, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v392, "title") ? (T['open-quote'] || '“') + applyTextCase(_v392, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2442
2442
|
}
|
|
2443
2443
|
else {
|
|
2444
2444
|
const _v393 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -2467,27 +2467,27 @@ function macro_title_primary_short(item, ctx) {
|
|
|
2467
2467
|
}
|
|
2468
2468
|
else if ((item.type === "entry-encyclopedia" && (item.author != null && item.author !== '') && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2469
2469
|
const _v399 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2470
|
-
_ch394 = ((applyTextCase(_v399, "title") ? '“' + applyTextCase(_v399, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v399, "title") ? '“' + applyTextCase(_v399, "title") + '”' : '') + '\uE022' : '')
|
|
2470
|
+
_ch394 = ((applyTextCase(_v399, "title") ? (T['open-quote'] || '“') + applyTextCase(_v399, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v399, "title") ? (T['open-quote'] || '“') + applyTextCase(_v399, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2471
2471
|
}
|
|
2472
2472
|
else if ((item.type === "entry-dictionary" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2473
2473
|
const _v400 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2474
|
-
_ch394 = ((stripNocaseSpans(_v400) ? '“' + stripNocaseSpans(_v400) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v400) ? '“' + stripNocaseSpans(_v400) + '”' : '') + '\uE022' : '')
|
|
2474
|
+
_ch394 = ((stripNocaseSpans(_v400) ? (T['open-quote'] || '“') + stripNocaseSpans(_v400) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v400) ? (T['open-quote'] || '“') + stripNocaseSpans(_v400) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2475
2475
|
}
|
|
2476
2476
|
else if ((item.type === "entry-encyclopedia" && (item["container-title"] != null && item["container-title"] !== ''))) {
|
|
2477
2477
|
const _v401 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2478
|
-
_ch394 = ((stripNocaseSpans(_v401) ? '“' + stripNocaseSpans(_v401) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v401) ? '“' + stripNocaseSpans(_v401) + '”' : '') + '\uE022' : '')
|
|
2478
|
+
_ch394 = ((stripNocaseSpans(_v401) ? (T['open-quote'] || '“') + stripNocaseSpans(_v401) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v401) ? (T['open-quote'] || '“') + stripNocaseSpans(_v401) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2479
2479
|
}
|
|
2480
2480
|
else if (item.type === "post") {
|
|
2481
2481
|
const _v402 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2482
|
-
_ch394 = ((stripNocaseSpans(_v402) ? '“' + stripNocaseSpans(_v402) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v402) ? '“' + stripNocaseSpans(_v402) + '”' : '') + '\uE022' : '')
|
|
2482
|
+
_ch394 = ((stripNocaseSpans(_v402) ? (T['open-quote'] || '“') + stripNocaseSpans(_v402) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v402) ? (T['open-quote'] || '“') + stripNocaseSpans(_v402) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2483
2483
|
}
|
|
2484
2484
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
2485
2485
|
const _v403 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2486
|
-
_ch394 = ((applyTextCase(_v403, "title") ? '“' + applyTextCase(_v403, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v403, "title") ? '“' + applyTextCase(_v403, "title") + '”' : '') + '\uE022' : '')
|
|
2486
|
+
_ch394 = ((applyTextCase(_v403, "title") ? (T['open-quote'] || '“') + applyTextCase(_v403, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v403, "title") ? (T['open-quote'] || '“') + applyTextCase(_v403, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2487
2487
|
}
|
|
2488
2488
|
else if ((item.type === "article" || item.type === "dataset" || item.type === "document" || item.type === "interview" || item.type === "manuscript" || item.type === "paper-conference" || item.type === "personal_communication" || item.type === "speech" || item.type === "thesis" || item.type === "webpage")) {
|
|
2489
2489
|
const _v404 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
2490
|
-
_ch394 = ((applyTextCase(_v404, "title") ? '“' + applyTextCase(_v404, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v404, "title") ? '“' + applyTextCase(_v404, "title") + '”' : '') + '\uE022' : '')
|
|
2490
|
+
_ch394 = ((applyTextCase(_v404, "title") ? (T['open-quote'] || '“') + applyTextCase(_v404, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v404, "title") ? (T['open-quote'] || '“') + applyTextCase(_v404, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2491
2491
|
}
|
|
2492
2492
|
else {
|
|
2493
2493
|
const _v405 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -2500,11 +2500,11 @@ function macro_title_volume(item, ctx) {
|
|
|
2500
2500
|
let _ch406 = ''
|
|
2501
2501
|
if (item.type === "manuscript") {
|
|
2502
2502
|
const _v407 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
2503
|
-
_ch406 = ((applyTextCase(_v407, "title") ? '“' + applyTextCase(_v407, "title") + '”' : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v407, "title") ? '“' + applyTextCase(_v407, "title") + '”' : '') + '\uE022' : '')
|
|
2503
|
+
_ch406 = ((applyTextCase(_v407, "title") ? (T['open-quote'] || '“') + applyTextCase(_v407, "title") + (T['close-quote'] || '”') : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v407, "title") ? (T['open-quote'] || '“') + applyTextCase(_v407, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2504
2504
|
}
|
|
2505
2505
|
else if ((item.type === "article-journal" || item.type === "article-magazine" || item.type === "article-newspaper" || item.type === "periodical" || item.type === "post-weblog" || item.type === "review" || item.type === "review-book")) {
|
|
2506
2506
|
const _v408 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
2507
|
-
_ch406 = ((applyTextCase(_v408, "title") ? '“' + applyTextCase(_v408, "title") + '”' : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v408, "title") ? '“' + applyTextCase(_v408, "title") + '”' : '') + '\uE022' : '')
|
|
2507
|
+
_ch406 = ((applyTextCase(_v408, "title") ? (T['open-quote'] || '“') + applyTextCase(_v408, "title") + (T['close-quote'] || '”') : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v408, "title") ? (T['open-quote'] || '“') + applyTextCase(_v408, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2508
2508
|
}
|
|
2509
2509
|
else if (((item["collection-editor"] != null && item["collection-editor"] !== '') || (item.compiler != null && item.compiler !== '') || (item.editor != null && item.editor !== '') || (item["editorial-director"] != null && item["editorial-director"] !== ''))) {
|
|
2510
2510
|
const _v409 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
@@ -2512,7 +2512,7 @@ function macro_title_volume(item, ctx) {
|
|
|
2512
2512
|
}
|
|
2513
2513
|
else if ((item.type === "interview" || item.type === "paper-conference")) {
|
|
2514
2514
|
const _v410 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
2515
|
-
_ch406 = ((applyTextCase(_v410, "title") ? '“' + applyTextCase(_v410, "title") + '”' : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v410, "title") ? '“' + applyTextCase(_v410, "title") + '”' : '') + '\uE022' : '')
|
|
2515
|
+
_ch406 = ((applyTextCase(_v410, "title") ? (T['open-quote'] || '“') + applyTextCase(_v410, "title") + (T['close-quote'] || '”') : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v410, "title") ? (T['open-quote'] || '“') + applyTextCase(_v410, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
2516
2516
|
}
|
|
2517
2517
|
else {
|
|
2518
2518
|
const _v411 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
@@ -2687,7 +2687,7 @@ function macro_description_format_short(item, ctx) {
|
|
|
2687
2687
|
if (!(ctx.position === "ibid") && !(ctx.position === "ibid-with-locator")) {
|
|
2688
2688
|
const _v451 = macro_source_monographic_preposition_note(item, ctx)
|
|
2689
2689
|
const _v452 = (item["volume-title"] != null && item["volume-title"] !== '' ? String(item["volume-title"]) : '')
|
|
2690
|
-
_ch450 = [_v451, ((applyTextCase(_v452, "title") ? '“' + applyTextCase(_v452, "title") + '”' : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v452, "title") ? '“' + applyTextCase(_v452, "title") + '”' : '') + '\uE022' : '')].filter(v => v !== '').join('')
|
|
2690
|
+
_ch450 = [_v451, ((applyTextCase(_v452, "title") ? (T['open-quote'] || '“') + applyTextCase(_v452, "title") + (T['close-quote'] || '”') : '') ? '\uE020volume-title\uE021' + (applyTextCase(_v452, "title") ? (T['open-quote'] || '“') + applyTextCase(_v452, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')].filter(v => v !== '').join('')
|
|
2691
2691
|
}
|
|
2692
2692
|
_gp444.push(_ch450)
|
|
2693
2693
|
}
|
|
@@ -5412,7 +5412,7 @@ function macro_source_locator_author_date(item, ctx) {
|
|
|
5412
5412
|
_gp1174.push(_v1175)
|
|
5413
5413
|
}
|
|
5414
5414
|
const _v1176 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
5415
|
-
_gp1174.push(((stripNocaseSpans(_v1176) ? '“' + stripNocaseSpans(_v1176) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v1176) ? '“' + stripNocaseSpans(_v1176) + '”' : '') + '\uE022' : ''))
|
|
5415
|
+
_gp1174.push(((stripNocaseSpans(_v1176) ? (T['open-quote'] || '“') + stripNocaseSpans(_v1176) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v1176) ? (T['open-quote'] || '“') + stripNocaseSpans(_v1176) + (T['close-quote'] || '”') : '') + '\uE022' : ''))
|
|
5416
5416
|
const _g1173 = _gp1174.filter(v => v !== '').join(" ")
|
|
5417
5417
|
_ch1171 = _g1173
|
|
5418
5418
|
}
|
|
@@ -6046,7 +6046,10 @@ function _normalizePunctuation(str) {
|
|
|
6046
6046
|
if (!str) return ''
|
|
6047
6047
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
6048
6048
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
6049
|
+
const Q = "[”’]"
|
|
6049
6050
|
return str
|
|
6051
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
6052
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
6050
6053
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
6051
6054
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
6052
6055
|
.replace(/ +/g, ' ')
|
package/harvard.js
CHANGED
|
@@ -983,7 +983,7 @@ function macro_title(item, ctx) {
|
|
|
983
983
|
}
|
|
984
984
|
else {
|
|
985
985
|
const _v51 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
986
|
-
_ch40 = ((stripNocaseSpans(_v51) ? '“' + stripNocaseSpans(_v51) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v51) ? '“' + stripNocaseSpans(_v51) + '”' : '') + '\uE022' : '')
|
|
986
|
+
_ch40 = ((stripNocaseSpans(_v51) ? (T['open-quote'] || '“') + stripNocaseSpans(_v51) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v51) ? (T['open-quote'] || '“') + stripNocaseSpans(_v51) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
987
987
|
}
|
|
988
988
|
return _ch40
|
|
989
989
|
}
|
|
@@ -1175,7 +1175,10 @@ function _normalizePunctuation(str) {
|
|
|
1175
1175
|
if (!str) return ''
|
|
1176
1176
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1177
1177
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1178
|
+
const Q = "[”’]"
|
|
1178
1179
|
return str
|
|
1180
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
1181
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
1179
1182
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1180
1183
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1181
1184
|
.replace(/ +/g, ' ')
|
package/ieee.js
CHANGED
|
@@ -888,7 +888,7 @@ function macro_title(item, ctx) {
|
|
|
888
888
|
}
|
|
889
889
|
else {
|
|
890
890
|
const _v38 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
891
|
-
_ch36 = ((stripNocaseSpans(_v38) ? '“' + stripNocaseSpans(_v38) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v38) ? '“' + stripNocaseSpans(_v38) + '”' : '') + '\uE022' : '')
|
|
891
|
+
_ch36 = ((stripNocaseSpans(_v38) ? (T['open-quote'] || '“') + stripNocaseSpans(_v38) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v38) ? (T['open-quote'] || '“') + stripNocaseSpans(_v38) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
892
892
|
}
|
|
893
893
|
return _ch36
|
|
894
894
|
}
|
|
@@ -1282,7 +1282,10 @@ function _normalizePunctuation(str) {
|
|
|
1282
1282
|
if (!str) return ''
|
|
1283
1283
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1284
1284
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1285
|
+
const Q = "[”’]"
|
|
1285
1286
|
return str
|
|
1287
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
1288
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
1286
1289
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1287
1290
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1288
1291
|
.replace(/ +/g, ' ')
|
package/mla.js
CHANGED
|
@@ -1128,11 +1128,11 @@ function macro_title_short(item, ctx) {
|
|
|
1128
1128
|
let _ch81 = ''
|
|
1129
1129
|
if (((item["reviewed-genre"] != null && item["reviewed-genre"] !== '') && (item.title != null && item.title !== ''))) {
|
|
1130
1130
|
const _v82 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1131
|
-
_ch81 = ((applyTextCase(_v82, "title") ? '“' + applyTextCase(_v82, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v82, "title") ? '“' + applyTextCase(_v82, "title") + '”' : '') + '\uE022' : '')
|
|
1131
|
+
_ch81 = ((applyTextCase(_v82, "title") ? (T['open-quote'] || '“') + applyTextCase(_v82, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v82, "title") ? (T['open-quote'] || '“') + applyTextCase(_v82, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1132
1132
|
}
|
|
1133
1133
|
else if (((item["reviewed-genre"] != null && item["reviewed-genre"] !== '') && (item["reviewed-title"] != null && item["reviewed-title"] !== '') && (item.title != null && item.title !== ''))) {
|
|
1134
1134
|
const _v83 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1135
|
-
_ch81 = ((applyTextCase(_v83, "title") ? '“' + applyTextCase(_v83, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v83, "title") ? '“' + applyTextCase(_v83, "title") + '”' : '') + '\uE022' : '')
|
|
1135
|
+
_ch81 = ((applyTextCase(_v83, "title") ? (T['open-quote'] || '“') + applyTextCase(_v83, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v83, "title") ? (T['open-quote'] || '“') + applyTextCase(_v83, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1136
1136
|
}
|
|
1137
1137
|
else {
|
|
1138
1138
|
const _v84 = macro_supplemental_generic_label_short(item, ctx)
|
|
@@ -1201,7 +1201,7 @@ function macro_title_part(item, ctx) {
|
|
|
1201
1201
|
let _ch101 = ''
|
|
1202
1202
|
if ((item.type === "article-journal" || item.type === "article-magazine" || item.type === "article-newspaper" || item.type === "periodical" || item.type === "post-weblog" || item.type === "review" || item.type === "review-book")) {
|
|
1203
1203
|
const _v102 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
1204
|
-
_ch101 = ((applyTextCase(_v102, "title") ? '“' + applyTextCase(_v102, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v102, "title") ? '“' + applyTextCase(_v102, "title") + '”' : '') + '\uE022' : '')
|
|
1204
|
+
_ch101 = ((applyTextCase(_v102, "title") ? (T['open-quote'] || '“') + applyTextCase(_v102, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v102, "title") ? (T['open-quote'] || '“') + applyTextCase(_v102, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1205
1205
|
}
|
|
1206
1206
|
else if (((item["collection-editor"] != null && item["collection-editor"] !== '') || (item.compiler != null && item.compiler !== '') || (item.editor != null && item.editor !== '') || (item["editorial-director"] != null && item["editorial-director"] !== ''))) {
|
|
1207
1207
|
const _v103 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
@@ -1209,7 +1209,7 @@ function macro_title_part(item, ctx) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
else if ((item.type === "interview" || item.type === "paper-conference")) {
|
|
1211
1211
|
const _v104 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
1212
|
-
_ch101 = ((applyTextCase(_v104, "title") ? '“' + applyTextCase(_v104, "title") + '”' : '') ? '\uE020part-title\uE021' + (applyTextCase(_v104, "title") ? '“' + applyTextCase(_v104, "title") + '”' : '') + '\uE022' : '')
|
|
1212
|
+
_ch101 = ((applyTextCase(_v104, "title") ? (T['open-quote'] || '“') + applyTextCase(_v104, "title") + (T['close-quote'] || '”') : '') ? '\uE020part-title\uE021' + (applyTextCase(_v104, "title") ? (T['open-quote'] || '“') + applyTextCase(_v104, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1213
1213
|
}
|
|
1214
1214
|
else {
|
|
1215
1215
|
const _v105 = (item["part-title"] != null && item["part-title"] !== '' ? String(item["part-title"]) : '')
|
|
@@ -1234,15 +1234,15 @@ function macro_title_primary(item, ctx) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
else if (item.type === "post") {
|
|
1236
1236
|
const _v110 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1237
|
-
_ch106 = ((stripNocaseSpans(_v110) ? '“' + stripNocaseSpans(_v110) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v110) ? '“' + stripNocaseSpans(_v110) + '”' : '') + '\uE022' : '')
|
|
1237
|
+
_ch106 = ((stripNocaseSpans(_v110) ? (T['open-quote'] || '“') + stripNocaseSpans(_v110) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v110) ? (T['open-quote'] || '“') + stripNocaseSpans(_v110) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1238
1238
|
}
|
|
1239
1239
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
1240
1240
|
const _v111 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1241
|
-
_ch106 = ((applyTextCase(_v111, "title") ? '“' + applyTextCase(_v111, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v111, "title") ? '“' + applyTextCase(_v111, "title") + '”' : '') + '\uE022' : '')
|
|
1241
|
+
_ch106 = ((applyTextCase(_v111, "title") ? (T['open-quote'] || '“') + applyTextCase(_v111, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v111, "title") ? (T['open-quote'] || '“') + applyTextCase(_v111, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1242
1242
|
}
|
|
1243
1243
|
else if ((item.type === "article" || item.type === "dataset" || item.type === "document" || item.type === "interview" || item.type === "manuscript" || item.type === "paper-conference" || item.type === "personal_communication" || item.type === "speech")) {
|
|
1244
1244
|
const _v112 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1245
|
-
_ch106 = ((applyTextCase(_v112, "title") ? '“' + applyTextCase(_v112, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v112, "title") ? '“' + applyTextCase(_v112, "title") + '”' : '') + '\uE022' : '')
|
|
1245
|
+
_ch106 = ((applyTextCase(_v112, "title") ? (T['open-quote'] || '“') + applyTextCase(_v112, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v112, "title") ? (T['open-quote'] || '“') + applyTextCase(_v112, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1246
1246
|
}
|
|
1247
1247
|
else {
|
|
1248
1248
|
const _v113 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -1267,15 +1267,15 @@ function macro_title_primary_short(item, ctx) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
else if (item.type === "post") {
|
|
1269
1269
|
const _v118 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1270
|
-
_ch114 = ((stripNocaseSpans(_v118) ? '“' + stripNocaseSpans(_v118) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v118) ? '“' + stripNocaseSpans(_v118) + '”' : '') + '\uE022' : '')
|
|
1270
|
+
_ch114 = ((stripNocaseSpans(_v118) ? (T['open-quote'] || '“') + stripNocaseSpans(_v118) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v118) ? (T['open-quote'] || '“') + stripNocaseSpans(_v118) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1271
1271
|
}
|
|
1272
1272
|
else if ((item["container-title"] != null && item["container-title"] !== '')) {
|
|
1273
1273
|
const _v119 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1274
|
-
_ch114 = ((applyTextCase(_v119, "title") ? '“' + applyTextCase(_v119, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v119, "title") ? '“' + applyTextCase(_v119, "title") + '”' : '') + '\uE022' : '')
|
|
1274
|
+
_ch114 = ((applyTextCase(_v119, "title") ? (T['open-quote'] || '“') + applyTextCase(_v119, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v119, "title") ? (T['open-quote'] || '“') + applyTextCase(_v119, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1275
1275
|
}
|
|
1276
1276
|
else if ((item.type === "article" || item.type === "dataset" || item.type === "document" || item.type === "interview" || item.type === "manuscript" || item.type === "paper-conference" || item.type === "personal_communication" || item.type === "speech")) {
|
|
1277
1277
|
const _v120 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
1278
|
-
_ch114 = ((applyTextCase(_v120, "title") ? '“' + applyTextCase(_v120, "title") + '”' : '') ? '\uE020title\uE021' + (applyTextCase(_v120, "title") ? '“' + applyTextCase(_v120, "title") + '”' : '') + '\uE022' : '')
|
|
1278
|
+
_ch114 = ((applyTextCase(_v120, "title") ? (T['open-quote'] || '“') + applyTextCase(_v120, "title") + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (applyTextCase(_v120, "title") ? (T['open-quote'] || '“') + applyTextCase(_v120, "title") + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
1279
1279
|
}
|
|
1280
1280
|
else {
|
|
1281
1281
|
const _v121 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -2287,7 +2287,10 @@ function _normalizePunctuation(str) {
|
|
|
2287
2287
|
if (!str) return ''
|
|
2288
2288
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
2289
2289
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
2290
|
+
const Q = "[”’]"
|
|
2290
2291
|
return str
|
|
2292
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
2293
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
2291
2294
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
2292
2295
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
2293
2296
|
.replace(/ +/g, ' ')
|
package/nature.js
CHANGED
|
@@ -71,7 +71,7 @@ const T = {
|
|
|
71
71
|
"available at:short": "avail. at",
|
|
72
72
|
"circa:short": "c.",
|
|
73
73
|
"cited:short": "cit.",
|
|
74
|
-
"film:short": "flm
|
|
74
|
+
"film:short": "flm",
|
|
75
75
|
"from:short": "fr.",
|
|
76
76
|
"letter:short": "let.",
|
|
77
77
|
"no date:short": "n.d.",
|
|
@@ -80,23 +80,23 @@ const T = {
|
|
|
80
80
|
"original-work-published:short": "orig. pub.",
|
|
81
81
|
"personal-communication:short": "pers. comm.",
|
|
82
82
|
"podcast-episode:short": "podcast ep.",
|
|
83
|
-
"radio-broadcast:short": "radio bdcst
|
|
83
|
+
"radio-broadcast:short": "radio bdcst",
|
|
84
84
|
"radio-series:short": "radio ser.",
|
|
85
85
|
"radio-series-episode:short": "radio ser. ep.",
|
|
86
86
|
"reference:short": {
|
|
87
87
|
"single": "ref.",
|
|
88
|
-
"multiple": "refs
|
|
88
|
+
"multiple": "refs"
|
|
89
89
|
},
|
|
90
|
-
"retrieved:short": "rtvd
|
|
90
|
+
"retrieved:short": "rtvd",
|
|
91
91
|
"review-of:short": "rev. of",
|
|
92
92
|
"scale:short": "sc.",
|
|
93
93
|
"special-issue:short": "spec. iss.",
|
|
94
|
-
"special-section:short": "spec.
|
|
95
|
-
"television-broadcast:short": "TV bdcst
|
|
94
|
+
"special-section:short": "spec. sect.",
|
|
95
|
+
"television-broadcast:short": "TV bdcst",
|
|
96
96
|
"television-series:short": "TV ser.",
|
|
97
97
|
"television-series-episode:short": "TV ser. ep.",
|
|
98
98
|
"video:short": "vid.",
|
|
99
|
-
"working-paper:short": "wkg
|
|
99
|
+
"working-paper:short": "wkg paper",
|
|
100
100
|
"and:symbol": "&",
|
|
101
101
|
"at:symbol": "@",
|
|
102
102
|
"article": "preprint",
|
|
@@ -107,11 +107,11 @@ const T = {
|
|
|
107
107
|
"broadcast": "broadcast",
|
|
108
108
|
"classic": "classical work",
|
|
109
109
|
"collection": "archival collection",
|
|
110
|
-
"dataset": "
|
|
110
|
+
"dataset": "data set",
|
|
111
111
|
"document": "document",
|
|
112
112
|
"entry": "entry",
|
|
113
113
|
"entry-dictionary": "dictionary entry",
|
|
114
|
-
"entry-encyclopedia": "
|
|
114
|
+
"entry-encyclopedia": "encyclopaedia entry",
|
|
115
115
|
"event": "event",
|
|
116
116
|
"graphic": "graphic",
|
|
117
117
|
"hearing": "hearing",
|
|
@@ -140,12 +140,12 @@ const T = {
|
|
|
140
140
|
"standard": "standard",
|
|
141
141
|
"thesis": "thesis",
|
|
142
142
|
"treaty": "treaty",
|
|
143
|
-
"webpage": "
|
|
143
|
+
"webpage": "web page",
|
|
144
144
|
"article-journal:short": "jour. art.",
|
|
145
145
|
"article-magazine:short": "mag. art.",
|
|
146
146
|
"article-newspaper:short": "newspaper art.",
|
|
147
|
-
"broadcast:short": "bdcst
|
|
148
|
-
"classic:short": "class. wk
|
|
147
|
+
"broadcast:short": "bdcst",
|
|
148
|
+
"classic:short": "class. wk",
|
|
149
149
|
"collection:short": "arch. coll.",
|
|
150
150
|
"document:short": "doc.",
|
|
151
151
|
"entry-dictionary:short": "dict. entry",
|
|
@@ -168,26 +168,26 @@ const T = {
|
|
|
168
168
|
"regulation:short": "reg.",
|
|
169
169
|
"report:short": "rep.",
|
|
170
170
|
"review:short": "rev.",
|
|
171
|
-
"review-book:short": "bk
|
|
171
|
+
"review-book:short": "bk rev.",
|
|
172
172
|
"software:short": "sftw.",
|
|
173
173
|
"song:short": "au. rec.",
|
|
174
|
-
"standard:short": "std
|
|
174
|
+
"standard:short": "std",
|
|
175
175
|
"thesis:short": "thes.",
|
|
176
|
-
"webpage:short": "
|
|
176
|
+
"webpage:short": "web pg.",
|
|
177
177
|
"hearing:verb": "testimony of",
|
|
178
178
|
"review:verb": "review of",
|
|
179
179
|
"review-book:verb": "review of the book",
|
|
180
180
|
"hearing:verb-short": "test. of",
|
|
181
181
|
"review:verb-short": "rev. of",
|
|
182
|
-
"review-book:verb-short": "rev. of the bk
|
|
182
|
+
"review-book:verb-short": "rev. of the bk",
|
|
183
183
|
"ad": "AD",
|
|
184
184
|
"bc": "BC",
|
|
185
185
|
"bce": "BCE",
|
|
186
186
|
"ce": "CE",
|
|
187
|
-
"open-quote": "
|
|
188
|
-
"close-quote": "
|
|
189
|
-
"open-inner-quote": "
|
|
190
|
-
"close-inner-quote": "
|
|
187
|
+
"open-quote": "‘",
|
|
188
|
+
"close-quote": "’",
|
|
189
|
+
"open-inner-quote": "“",
|
|
190
|
+
"close-inner-quote": "”",
|
|
191
191
|
"page-range-delimiter": "–",
|
|
192
192
|
"colon": ":",
|
|
193
193
|
"comma": ",",
|
|
@@ -320,31 +320,31 @@ const T = {
|
|
|
320
320
|
},
|
|
321
321
|
"appendix:short": {
|
|
322
322
|
"single": "app.",
|
|
323
|
-
"multiple": "apps
|
|
323
|
+
"multiple": "apps"
|
|
324
324
|
},
|
|
325
325
|
"article-locator:short": {
|
|
326
326
|
"single": "art.",
|
|
327
|
-
"multiple": "arts
|
|
327
|
+
"multiple": "arts"
|
|
328
328
|
},
|
|
329
329
|
"book:short": {
|
|
330
|
-
"single": "bk
|
|
331
|
-
"multiple": "bks
|
|
330
|
+
"single": "bk",
|
|
331
|
+
"multiple": "bks"
|
|
332
332
|
},
|
|
333
333
|
"canon:short": {
|
|
334
334
|
"single": "can.",
|
|
335
335
|
"multiple": "cann."
|
|
336
336
|
},
|
|
337
337
|
"chapter:short": {
|
|
338
|
-
"single": "
|
|
339
|
-
"multiple": "
|
|
338
|
+
"single": "ch.",
|
|
339
|
+
"multiple": "chs"
|
|
340
340
|
},
|
|
341
341
|
"column:short": {
|
|
342
342
|
"single": "col.",
|
|
343
|
-
"multiple": "cols
|
|
343
|
+
"multiple": "cols"
|
|
344
344
|
},
|
|
345
345
|
"elocation:short": {
|
|
346
346
|
"single": "loc.",
|
|
347
|
-
"multiple": "locs
|
|
347
|
+
"multiple": "locs"
|
|
348
348
|
},
|
|
349
349
|
"equation:short": {
|
|
350
350
|
"single": "eq.",
|
|
@@ -352,15 +352,15 @@ const T = {
|
|
|
352
352
|
},
|
|
353
353
|
"figure:short": {
|
|
354
354
|
"single": "fig.",
|
|
355
|
-
"multiple": "figs
|
|
355
|
+
"multiple": "figs"
|
|
356
356
|
},
|
|
357
357
|
"folio:short": {
|
|
358
358
|
"single": "fol.",
|
|
359
|
-
"multiple": "fols
|
|
359
|
+
"multiple": "fols"
|
|
360
360
|
},
|
|
361
361
|
"issue:short": {
|
|
362
362
|
"single": "no.",
|
|
363
|
-
"multiple": "nos
|
|
363
|
+
"multiple": "nos"
|
|
364
364
|
},
|
|
365
365
|
"line:short": {
|
|
366
366
|
"single": "l.",
|
|
@@ -380,11 +380,11 @@ const T = {
|
|
|
380
380
|
},
|
|
381
381
|
"paragraph:short": {
|
|
382
382
|
"single": "para.",
|
|
383
|
-
"multiple": "paras
|
|
383
|
+
"multiple": "paras"
|
|
384
384
|
},
|
|
385
385
|
"part:short": {
|
|
386
|
-
"single": "pt
|
|
387
|
-
"multiple": "pts
|
|
386
|
+
"single": "pt",
|
|
387
|
+
"multiple": "pts"
|
|
388
388
|
},
|
|
389
389
|
"rule:short": {
|
|
390
390
|
"single": "r.",
|
|
@@ -392,23 +392,23 @@ const T = {
|
|
|
392
392
|
},
|
|
393
393
|
"scene:short": {
|
|
394
394
|
"single": "sc.",
|
|
395
|
-
"multiple": "scs
|
|
395
|
+
"multiple": "scs"
|
|
396
396
|
},
|
|
397
397
|
"section:short": {
|
|
398
|
-
"single": "
|
|
399
|
-
"multiple": "
|
|
398
|
+
"single": "sect.",
|
|
399
|
+
"multiple": "sects"
|
|
400
400
|
},
|
|
401
401
|
"sub-verbo:short": {
|
|
402
402
|
"single": "s.v.",
|
|
403
403
|
"multiple": "s.vv."
|
|
404
404
|
},
|
|
405
405
|
"supplement:short": {
|
|
406
|
-
"single": "
|
|
407
|
-
"multiple": "
|
|
406
|
+
"single": "suppl.",
|
|
407
|
+
"multiple": "suppls"
|
|
408
408
|
},
|
|
409
409
|
"table:short": {
|
|
410
410
|
"single": "tbl.",
|
|
411
|
-
"multiple": "tbls
|
|
411
|
+
"multiple": "tbls"
|
|
412
412
|
},
|
|
413
413
|
"title-locator:short": {
|
|
414
414
|
"single": "tit.",
|
|
@@ -420,7 +420,7 @@ const T = {
|
|
|
420
420
|
},
|
|
421
421
|
"volume:short": {
|
|
422
422
|
"single": "vol.",
|
|
423
|
-
"multiple": "vols
|
|
423
|
+
"multiple": "vols"
|
|
424
424
|
},
|
|
425
425
|
"chapter:symbol": {
|
|
426
426
|
"single": "c.",
|
|
@@ -451,8 +451,8 @@ const T = {
|
|
|
451
451
|
"multiple": "editions"
|
|
452
452
|
},
|
|
453
453
|
"first-reference-note-number": {
|
|
454
|
-
"single": "
|
|
455
|
-
"multiple": "
|
|
454
|
+
"single": "note",
|
|
455
|
+
"multiple": "notes"
|
|
456
456
|
},
|
|
457
457
|
"number": {
|
|
458
458
|
"single": "number",
|
|
@@ -479,28 +479,28 @@ const T = {
|
|
|
479
479
|
"multiple": "versions"
|
|
480
480
|
},
|
|
481
481
|
"chapter-number:short": {
|
|
482
|
-
"single": "
|
|
483
|
-
"multiple": "
|
|
482
|
+
"single": "ch.",
|
|
483
|
+
"multiple": "chs"
|
|
484
484
|
},
|
|
485
485
|
"citation-number:short": {
|
|
486
486
|
"single": "cit.",
|
|
487
|
-
"multiple": "cits
|
|
487
|
+
"multiple": "cits"
|
|
488
488
|
},
|
|
489
489
|
"collection-number:short": {
|
|
490
490
|
"single": "no.",
|
|
491
|
-
"multiple": "nos
|
|
491
|
+
"multiple": "nos"
|
|
492
492
|
},
|
|
493
493
|
"edition:short": {
|
|
494
|
-
"single": "
|
|
495
|
-
"multiple": "
|
|
494
|
+
"single": "edn",
|
|
495
|
+
"multiple": "edns"
|
|
496
496
|
},
|
|
497
497
|
"first-reference-note-number:short": {
|
|
498
|
-
"single": "
|
|
499
|
-
"multiple": "
|
|
498
|
+
"single": "n.",
|
|
499
|
+
"multiple": "nn."
|
|
500
500
|
},
|
|
501
501
|
"number:short": {
|
|
502
502
|
"single": "no.",
|
|
503
|
-
"multiple": "nos
|
|
503
|
+
"multiple": "nos"
|
|
504
504
|
},
|
|
505
505
|
"number-of-pages:short": {
|
|
506
506
|
"single": "p.",
|
|
@@ -508,15 +508,15 @@ const T = {
|
|
|
508
508
|
},
|
|
509
509
|
"number-of-volumes:short": {
|
|
510
510
|
"single": "vol.",
|
|
511
|
-
"multiple": "vols
|
|
511
|
+
"multiple": "vols"
|
|
512
512
|
},
|
|
513
513
|
"page-first:short": {
|
|
514
514
|
"single": "p.",
|
|
515
515
|
"multiple": "pp."
|
|
516
516
|
},
|
|
517
517
|
"printing:short": {
|
|
518
|
-
"single": "ptg
|
|
519
|
-
"multiple": "ptgs
|
|
518
|
+
"single": "ptg",
|
|
519
|
+
"multiple": "ptgs"
|
|
520
520
|
},
|
|
521
521
|
"version:short": "v.",
|
|
522
522
|
"author": "",
|
|
@@ -584,8 +584,8 @@ const T = {
|
|
|
584
584
|
"multiple": "narrators"
|
|
585
585
|
},
|
|
586
586
|
"organizer": {
|
|
587
|
-
"single": "
|
|
588
|
-
"multiple": "
|
|
587
|
+
"single": "organiser",
|
|
588
|
+
"multiple": "organisers"
|
|
589
589
|
},
|
|
590
590
|
"original-author": "",
|
|
591
591
|
"performer": {
|
|
@@ -612,67 +612,64 @@ const T = {
|
|
|
612
612
|
},
|
|
613
613
|
"collection-editor:short": {
|
|
614
614
|
"single": "ed.",
|
|
615
|
-
"multiple": "eds
|
|
615
|
+
"multiple": "eds"
|
|
616
616
|
},
|
|
617
617
|
"compiler:short": {
|
|
618
618
|
"single": "comp.",
|
|
619
|
-
"multiple": "comps
|
|
619
|
+
"multiple": "comps"
|
|
620
620
|
},
|
|
621
621
|
"contributor:short": {
|
|
622
622
|
"single": "contrib.",
|
|
623
|
-
"multiple": "contribs
|
|
623
|
+
"multiple": "contribs"
|
|
624
624
|
},
|
|
625
625
|
"curator:short": {
|
|
626
626
|
"single": "cur.",
|
|
627
|
-
"multiple": "curs
|
|
627
|
+
"multiple": "curs"
|
|
628
628
|
},
|
|
629
629
|
"director:short": {
|
|
630
630
|
"single": "dir.",
|
|
631
|
-
"multiple": "dirs
|
|
631
|
+
"multiple": "dirs"
|
|
632
632
|
},
|
|
633
633
|
"editor:short": {
|
|
634
634
|
"single": "ed.",
|
|
635
|
-
"multiple": "eds
|
|
635
|
+
"multiple": "eds"
|
|
636
636
|
},
|
|
637
637
|
"editor-translator:short": {
|
|
638
638
|
"single": "ed. & trans.",
|
|
639
|
-
"multiple": "eds
|
|
639
|
+
"multiple": "eds & trans."
|
|
640
640
|
},
|
|
641
641
|
"editortranslator:short": {
|
|
642
642
|
"single": "ed. & trans.",
|
|
643
|
-
"multiple": "eds
|
|
643
|
+
"multiple": "eds & trans."
|
|
644
644
|
},
|
|
645
645
|
"editorial-director:short": {
|
|
646
646
|
"single": "ed.",
|
|
647
|
-
"multiple": "eds
|
|
647
|
+
"multiple": "eds"
|
|
648
648
|
},
|
|
649
649
|
"executive-producer:short": {
|
|
650
650
|
"single": "exec. prod.",
|
|
651
|
-
"multiple": "exec. prods
|
|
652
|
-
},
|
|
653
|
-
"illustrator:short": {
|
|
654
|
-
"single": "ill.",
|
|
655
|
-
"multiple": "ills."
|
|
651
|
+
"multiple": "exec. prods"
|
|
656
652
|
},
|
|
653
|
+
"illustrator:short": "illus.",
|
|
657
654
|
"narrator:short": {
|
|
658
655
|
"single": "narr.",
|
|
659
|
-
"multiple": "narrs
|
|
656
|
+
"multiple": "narrs"
|
|
660
657
|
},
|
|
661
658
|
"organizer:short": {
|
|
662
659
|
"single": "org.",
|
|
663
|
-
"multiple": "orgs
|
|
660
|
+
"multiple": "orgs"
|
|
664
661
|
},
|
|
665
662
|
"performer:short": {
|
|
666
663
|
"single": "perf.",
|
|
667
|
-
"multiple": "perfs
|
|
664
|
+
"multiple": "perfs"
|
|
668
665
|
},
|
|
669
666
|
"producer:short": {
|
|
670
667
|
"single": "prod.",
|
|
671
|
-
"multiple": "prods
|
|
668
|
+
"multiple": "prods"
|
|
672
669
|
},
|
|
673
670
|
"script-writer:short": {
|
|
674
|
-
"single": "wrtr
|
|
675
|
-
"multiple": "wrtrs
|
|
671
|
+
"single": "wrtr",
|
|
672
|
+
"multiple": "wrtrs"
|
|
676
673
|
},
|
|
677
674
|
"series-creator:short": {
|
|
678
675
|
"single": "ser. creator",
|
|
@@ -699,8 +696,8 @@ const T = {
|
|
|
699
696
|
"host:verb": "hosted by",
|
|
700
697
|
"illustrator:verb": "illustrated by",
|
|
701
698
|
"interviewer:verb": "interview by",
|
|
702
|
-
"narrator:verb": "
|
|
703
|
-
"organizer:verb": "
|
|
699
|
+
"narrator:verb": "read by",
|
|
700
|
+
"organizer:verb": "organised by",
|
|
704
701
|
"original-author:verb": "by",
|
|
705
702
|
"performer:verb": "performed by",
|
|
706
703
|
"producer:verb": "produced by",
|
|
@@ -719,10 +716,10 @@ const T = {
|
|
|
719
716
|
"editortranslator:verb-short": "ed. & trans. by",
|
|
720
717
|
"editorial-director:verb-short": "ed. by",
|
|
721
718
|
"executive-producer:verb-short": "exec. prod. by",
|
|
722
|
-
"illustrator:verb-short": "
|
|
723
|
-
"narrator:verb-short": "
|
|
719
|
+
"illustrator:verb-short": "illus. by",
|
|
720
|
+
"narrator:verb-short": "read by",
|
|
724
721
|
"organizer:verb-short": "org. by",
|
|
725
|
-
"performer:verb-short": "
|
|
722
|
+
"performer:verb-short": "perfd by",
|
|
726
723
|
"producer:verb-short": "prod. by",
|
|
727
724
|
"script-writer:verb-short": "writ. by",
|
|
728
725
|
"translator:verb-short": "trans. by",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citestyle/styles",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Pre-compiled popular CSL styles (~3-5KB each)",
|
|
5
5
|
"author": "Uniweb",
|
|
6
6
|
"homepage": "https://github.com/uniweb/csl/tree/main/packages/styles",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"README.md"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@citestyle/core": "1.0.
|
|
56
|
+
"@citestyle/core": "1.0.1"
|
|
57
57
|
},
|
|
58
58
|
"license": "MIT",
|
|
59
59
|
"scripts": {
|
package/science.js
CHANGED
|
@@ -828,7 +828,7 @@ function macro_title(item, ctx) {
|
|
|
828
828
|
}
|
|
829
829
|
else if ((item.type === "chapter" || item.type === "report" || item.type === "thesis" || item.type === "paper-conference")) {
|
|
830
830
|
const _v10 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
831
|
-
_ch8 = ((stripNocaseSpans(_v10) ? '“' + stripNocaseSpans(_v10) + '”' : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v10) ? '“' + stripNocaseSpans(_v10) + '”' : '') + '\uE022' : '')
|
|
831
|
+
_ch8 = ((stripNocaseSpans(_v10) ? (T['open-quote'] || '“') + stripNocaseSpans(_v10) + (T['close-quote'] || '”') : '') ? '\uE020title\uE021' + (stripNocaseSpans(_v10) ? (T['open-quote'] || '“') + stripNocaseSpans(_v10) + (T['close-quote'] || '”') : '') + '\uE022' : '')
|
|
832
832
|
}
|
|
833
833
|
else {
|
|
834
834
|
const _v11 = (item.title != null && item.title !== '' ? String(item.title) : '')
|
|
@@ -1038,7 +1038,10 @@ function _normalizePunctuation(str) {
|
|
|
1038
1038
|
if (!str) return ''
|
|
1039
1039
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
1040
1040
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
1041
|
+
const Q = "[”’]"
|
|
1041
1042
|
return str
|
|
1043
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
1044
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
1042
1045
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
1043
1046
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
1044
1047
|
.replace(/ +/g, ' ')
|
package/vancouver.js
CHANGED
|
@@ -961,7 +961,10 @@ function _normalizePunctuation(str) {
|
|
|
961
961
|
if (!str) return ''
|
|
962
962
|
// F matches PUA tokens (formatting U+E000-E007 and semantic U+E020-E022) that may appear between dots
|
|
963
963
|
const F = '[\uE000-\uE007\uE020-\uE022]*'
|
|
964
|
+
const Q = "[”’]"
|
|
964
965
|
return str
|
|
966
|
+
.replace(new RegExp('(' + Q + ')(' + F + ')([.,])', 'g'), '$3$1$2')
|
|
967
|
+
.replace(new RegExp('([.!?])(' + F + ')([.,])(' + F + ')(' + Q + ')', 'g'), '$1$2$4$5')
|
|
965
968
|
.replace(new RegExp('([.!?])(' + F + ')\\. ', 'g'), '$1$2 ')
|
|
966
969
|
.replace(new RegExp('\\.(' + F + ')\\.', 'g'), '.$1')
|
|
967
970
|
.replace(/ +/g, ' ')
|