@baiyibai-antora/extensions 1.21.0 → 1.21.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/CHANGELOG.adoc
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
All notable changes to this project will be documented in this file.
|
|
5
5
|
|
|
6
|
+
== [1.21.1] - 2026-09-09
|
|
7
|
+
|
|
8
|
+
=== Fixed
|
|
9
|
+
|
|
10
|
+
* cite-it: a report entry's `institution` field, `@techreport` included, never reached the rendered bibliography: biblatex-csl-converter lists `institution` as a required field of its `report` type but gives it no CSL target, its exporter skips any field without one, and `publisher` is not in the report type's own field list, so no field on a report entry carried the publishing body into the CSL item. Reported against a standards body missing from a technical report's entry, confirmed against the library's source and a real export, and still present on the library's current main branch, now continued under the name bibliojson. `parseCiteFile` reads `institution` from the raw parsed entry and attaches it as CSL `publisher` for report entries, the variable the bundled styles' report branches already render; several institutions joined by `and` become one comma-separated publisher. Three new tests cover the single institution, the joined list, and the rendered text; the demonstration page's technical reports now render their publishing body
|
|
11
|
+
|
|
6
12
|
== [1.21.0] - 2026-09-09
|
|
7
13
|
|
|
8
14
|
=== Added
|
|
@@ -29,6 +29,15 @@
|
|
|
29
29
|
* for `@book`/`@report`-shaped series numbers, wrong for a journal
|
|
30
30
|
* article's issue). Remapped to `issue` specifically for the
|
|
31
31
|
* `article-journal` case, not applied to any other entry type.
|
|
32
|
+
* - The `institution` field, required by the library's own schema for
|
|
33
|
+
* the `report` type (`@techreport` is aliased to it), has no CSL
|
|
34
|
+
* target in the library's field table, and the exporter skips any
|
|
35
|
+
* field without one, so a report's publishing body never reaches the
|
|
36
|
+
* CSL item; `publisher` is not in the report type's own allowed field
|
|
37
|
+
* list either, so there is no other route. Confirmed against the
|
|
38
|
+
* library's source and a real export. Read from the raw parsed entry
|
|
39
|
+
* and attached as CSL `publisher` for report entries, the CSL
|
|
40
|
+
* variable the bundled styles' report branches already render.
|
|
32
41
|
* - A custom `supersededby` field, naming the citation key of a newer
|
|
33
42
|
* entry replacing this one, is not a real BibLaTeX field and never
|
|
34
43
|
* reaches CSL export at all (verified directly): read from the raw
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/extensions/cite-it/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAWH;;;kBAGkB;AAClB,eAAO,MAAM,eAAe,aAAa,CAAC;AA8F1C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA8E3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,EAC9B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAChC;IAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAQ5D"}
|
|
@@ -30,6 +30,15 @@
|
|
|
30
30
|
* for `@book`/`@report`-shaped series numbers, wrong for a journal
|
|
31
31
|
* article's issue). Remapped to `issue` specifically for the
|
|
32
32
|
* `article-journal` case, not applied to any other entry type.
|
|
33
|
+
* - The `institution` field, required by the library's own schema for
|
|
34
|
+
* the `report` type (`@techreport` is aliased to it), has no CSL
|
|
35
|
+
* target in the library's field table, and the exporter skips any
|
|
36
|
+
* field without one, so a report's publishing body never reaches the
|
|
37
|
+
* CSL item; `publisher` is not in the report type's own allowed field
|
|
38
|
+
* list either, so there is no other route. Confirmed against the
|
|
39
|
+
* library's source and a real export. Read from the raw parsed entry
|
|
40
|
+
* and attached as CSL `publisher` for report entries, the CSL
|
|
41
|
+
* variable the bundled styles' report branches already render.
|
|
33
42
|
* - A custom `supersededby` field, naming the citation key of a newer
|
|
34
43
|
* entry replacing this one, is not a real BibLaTeX field and never
|
|
35
44
|
* reaches CSL export at all (verified directly): read from the raw
|
|
@@ -96,6 +105,15 @@ function plainTextField(value) {
|
|
|
96
105
|
.trim();
|
|
97
106
|
return text || undefined;
|
|
98
107
|
}
|
|
108
|
+
/** Flattens a list-of-literals field (the library's `l_literal` type, one
|
|
109
|
+
* rich-text run array per `and`-separated item) to a single string, items
|
|
110
|
+
* joined by a comma and a space. Returns `undefined` when nothing remains. */
|
|
111
|
+
function listLiteralField(value) {
|
|
112
|
+
if (!Array.isArray(value))
|
|
113
|
+
return undefined;
|
|
114
|
+
const items = value.map((item) => plainTextField(item)).filter((t) => typeof t === 'string');
|
|
115
|
+
return items.length ? items.join(', ') : undefined;
|
|
116
|
+
}
|
|
99
117
|
const parse = bibtexModule.parse;
|
|
100
118
|
const CSLExporter = bibtexModule.CSLExporter;
|
|
101
119
|
/**
|
|
@@ -164,6 +182,13 @@ function parseCiteFile(bibText, sourceLabel) {
|
|
|
164
182
|
delete cslItem['collection-number'];
|
|
165
183
|
}
|
|
166
184
|
}
|
|
185
|
+
// See the module docblock: the report type's institution never
|
|
186
|
+
// reaches CSL export, attached here as publisher.
|
|
187
|
+
if (cslItem.type === 'report' && cslItem['publisher'] === undefined) {
|
|
188
|
+
const institution = listLiteralField(rawEntry.fields?.['institution']);
|
|
189
|
+
if (institution)
|
|
190
|
+
cslItem['publisher'] = institution;
|
|
191
|
+
}
|
|
167
192
|
if (entries.has(citationKey)) {
|
|
168
193
|
warnings.push(`${sourceLabel}: duplicate citation key "${citationKey}" within the same file; the later entry wins`);
|
|
169
194
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/registry.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/extensions/cite-it/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;;;AAsHH,sCAiFC;AAQD,8CAWC;AAxND,uEAAuE;AACvE,4EAA4E;AAC5E,6EAA6E;AAC7E,sEAAsE;AACtE,2EAA2E;AAC3E,yEAAyE;AACzE,oCAAoC;AACpC,MAAM,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEvD;;;kBAGkB;AACL,QAAA,eAAe,GAAG,UAAU,CAAC;AA6B1C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,IAAI,GAAG,KAAK;SACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACZ,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,OAAO,EAAE,CAAC;QACjD,MAAM,CAAC,GAAG,IAAwB,CAAC;QACnC,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,C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