@manuscripts/transform 1.4.4-LEAN-2737 → 1.4.4-LEAN-2737-2
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.
|
@@ -628,20 +628,16 @@ class JATSExporter {
|
|
|
628
628
|
warn(`${node.attrs.id} has no rid`);
|
|
629
629
|
return node.attrs.label;
|
|
630
630
|
}
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
warn(`Missing citation ${node.attrs.rid}`);
|
|
634
|
-
return '';
|
|
635
|
-
}
|
|
636
|
-
const rids = citation.embeddedCitationItems.filter((item) => {
|
|
631
|
+
const rids = node.attrs
|
|
632
|
+
.embeddedCitationItems.filter((item) => {
|
|
637
633
|
if (!this.modelMap.has(item.bibliographyItem)) {
|
|
638
|
-
warn(`Missing ${item.bibliographyItem} referenced by ${
|
|
634
|
+
warn(`Missing ${item.bibliographyItem} referenced by ${node.attrs.rid}`);
|
|
639
635
|
return false;
|
|
640
636
|
}
|
|
641
637
|
return true;
|
|
642
638
|
});
|
|
643
639
|
if (!rids.length) {
|
|
644
|
-
warn(`${
|
|
640
|
+
warn(`${node.attrs.rid} has no confirmed rids`);
|
|
645
641
|
return '';
|
|
646
642
|
}
|
|
647
643
|
const xref = this.document.createElement('xref');
|
|
@@ -271,8 +271,9 @@ const encoders = {
|
|
|
271
271
|
}),
|
|
272
272
|
bibliography_item: (node) => {
|
|
273
273
|
const { type, containerTitle, doi, volume, issue, supplement, page, title, literal, } = node.attrs;
|
|
274
|
-
const
|
|
275
|
-
const
|
|
274
|
+
const getObjectAtrr = (obj) => typeof obj === 'string' ? fromJson(obj) : obj;
|
|
275
|
+
const author = getObjectAtrr(node.attrs.author);
|
|
276
|
+
const issued = getObjectAtrr(node.attrs.issued);
|
|
276
277
|
const ref = {
|
|
277
278
|
type,
|
|
278
279
|
};
|
|
@@ -621,20 +621,16 @@ export class JATSExporter {
|
|
|
621
621
|
warn(`${node.attrs.id} has no rid`);
|
|
622
622
|
return node.attrs.label;
|
|
623
623
|
}
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
warn(`Missing citation ${node.attrs.rid}`);
|
|
627
|
-
return '';
|
|
628
|
-
}
|
|
629
|
-
const rids = citation.embeddedCitationItems.filter((item) => {
|
|
624
|
+
const rids = node.attrs
|
|
625
|
+
.embeddedCitationItems.filter((item) => {
|
|
630
626
|
if (!this.modelMap.has(item.bibliographyItem)) {
|
|
631
|
-
warn(`Missing ${item.bibliographyItem} referenced by ${
|
|
627
|
+
warn(`Missing ${item.bibliographyItem} referenced by ${node.attrs.rid}`);
|
|
632
628
|
return false;
|
|
633
629
|
}
|
|
634
630
|
return true;
|
|
635
631
|
});
|
|
636
632
|
if (!rids.length) {
|
|
637
|
-
warn(`${
|
|
633
|
+
warn(`${node.attrs.rid} has no confirmed rids`);
|
|
638
634
|
return '';
|
|
639
635
|
}
|
|
640
636
|
const xref = this.document.createElement('xref');
|
|
@@ -263,8 +263,9 @@ const encoders = {
|
|
|
263
263
|
}),
|
|
264
264
|
bibliography_item: (node) => {
|
|
265
265
|
const { type, containerTitle, doi, volume, issue, supplement, page, title, literal, } = node.attrs;
|
|
266
|
-
const
|
|
267
|
-
const
|
|
266
|
+
const getObjectAtrr = (obj) => typeof obj === 'string' ? fromJson(obj) : obj;
|
|
267
|
+
const author = getObjectAtrr(node.attrs.author);
|
|
268
|
+
const issued = getObjectAtrr(node.attrs.issued);
|
|
268
269
|
const ref = {
|
|
269
270
|
type,
|
|
270
271
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/transform",
|
|
3
3
|
"description": "ProseMirror transformer for Manuscripts applications",
|
|
4
|
-
"version": "1.4.4-LEAN-2737",
|
|
4
|
+
"version": "1.4.4-LEAN-2737-2",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-transform",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|