@manuscripts/transform 4.3.0 → 4.3.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.
@@ -540,7 +540,7 @@ class JATSExporter {
540
540
  awardGroupElement.setAttribute('id', normalizeID(awardGroup.attrs.id));
541
541
  appendChildIfPresent(awardGroupElement, 'funding-source', awardGroup.attrs.source);
542
542
  awardGroup.attrs.code
543
- .split(';')
543
+ ?.split(';')
544
544
  .forEach((code) => appendChildIfPresent(awardGroupElement, 'award-id', code));
545
545
  appendChildIfPresent(awardGroupElement, 'principal-award-recipient', awardGroup.attrs.recipient);
546
546
  return awardGroupElement;
@@ -625,7 +625,7 @@ class JATSExporter {
625
625
  },
626
626
  doc: () => '',
627
627
  equation: (node) => {
628
- return this.createEquation(node);
628
+ return node.attrs.contents ? this.createEquation(node) : '';
629
629
  },
630
630
  general_table_footnote: (node) => {
631
631
  const el = this.createElement('general-table-footnote');
@@ -634,6 +634,9 @@ class JATSExporter {
634
634
  return el;
635
635
  },
636
636
  inline_equation: (node) => {
637
+ if (!node.attrs.contents) {
638
+ return '';
639
+ }
637
640
  const eqElement = this.createElement('inline-formula');
638
641
  const equation = this.createEquation(node, true);
639
642
  eqElement.append(equation);
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "4.3.0";
4
+ exports.VERSION = "4.3.2";
@@ -500,7 +500,7 @@ export class JATSExporter {
500
500
  awardGroupElement.setAttribute('id', normalizeID(awardGroup.attrs.id));
501
501
  appendChildIfPresent(awardGroupElement, 'funding-source', awardGroup.attrs.source);
502
502
  awardGroup.attrs.code
503
- .split(';')
503
+ ?.split(';')
504
504
  .forEach((code) => appendChildIfPresent(awardGroupElement, 'award-id', code));
505
505
  appendChildIfPresent(awardGroupElement, 'principal-award-recipient', awardGroup.attrs.recipient);
506
506
  return awardGroupElement;
@@ -585,7 +585,7 @@ export class JATSExporter {
585
585
  },
586
586
  doc: () => '',
587
587
  equation: (node) => {
588
- return this.createEquation(node);
588
+ return node.attrs.contents ? this.createEquation(node) : '';
589
589
  },
590
590
  general_table_footnote: (node) => {
591
591
  const el = this.createElement('general-table-footnote');
@@ -594,6 +594,9 @@ export class JATSExporter {
594
594
  return el;
595
595
  },
596
596
  inline_equation: (node) => {
597
+ if (!node.attrs.contents) {
598
+ return '';
599
+ }
597
600
  const eqElement = this.createElement('inline-formula');
598
601
  const equation = this.createEquation(node, true);
599
602
  eqElement.append(equation);
@@ -1 +1 @@
1
- export const VERSION = "4.3.0";
1
+ export const VERSION = "4.3.2";
@@ -1 +1 @@
1
- export declare const VERSION = "4.3.0";
1
+ export declare const VERSION = "4.3.2";
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": "4.3.0",
4
+ "version": "4.3.2",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",