@manuscripts/transform 2.3.4-LEAN-3579.0 → 2.3.4-LEAN-3579.3

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.
@@ -154,6 +154,7 @@ class JATSExporter {
154
154
  this.moveFloatsGroup(body, article);
155
155
  this.removeBackContainer(body);
156
156
  this.updateFootnoteTypes(front, back);
157
+ this.fillEmptyFootnotesElements(article);
157
158
  this.fillEmptyFootnotes(article);
158
159
  }
159
160
  await this.rewriteIDs(idGenerator);
@@ -1704,5 +1705,9 @@ class JATSExporter {
1704
1705
  const emptyFootnotes = Array.from(articleElement.querySelectorAll('fn')).filter((fn) => { var _a; return !((_a = fn.textContent) === null || _a === void 0 ? void 0 : _a.trim()); });
1705
1706
  emptyFootnotes.forEach((fn) => fn.appendChild(this.document.createElement('p')));
1706
1707
  }
1708
+ fillEmptyFootnotesElements(articleElement) {
1709
+ const emptyElements = Array.from(articleElement.querySelectorAll('fn-group')).filter((element) => !element.querySelector('fn') && !element.querySelector('p'));
1710
+ emptyElements.forEach((element) => element.appendChild(this.document.createElement('fn')));
1711
+ }
1707
1712
  }
1708
1713
  exports.JATSExporter = JATSExporter;
@@ -146,6 +146,7 @@ export class JATSExporter {
146
146
  this.moveFloatsGroup(body, article);
147
147
  this.removeBackContainer(body);
148
148
  this.updateFootnoteTypes(front, back);
149
+ this.fillEmptyFootnotesElements(article);
149
150
  this.fillEmptyFootnotes(article);
150
151
  }
151
152
  await this.rewriteIDs(idGenerator);
@@ -1696,4 +1697,8 @@ export class JATSExporter {
1696
1697
  const emptyFootnotes = Array.from(articleElement.querySelectorAll('fn')).filter((fn) => { var _a; return !((_a = fn.textContent) === null || _a === void 0 ? void 0 : _a.trim()); });
1697
1698
  emptyFootnotes.forEach((fn) => fn.appendChild(this.document.createElement('p')));
1698
1699
  }
1700
+ fillEmptyFootnotesElements(articleElement) {
1701
+ const emptyElements = Array.from(articleElement.querySelectorAll('fn-group')).filter((element) => !element.querySelector('fn') && !element.querySelector('p'));
1702
+ emptyElements.forEach((element) => element.appendChild(this.document.createElement('fn')));
1703
+ }
1699
1704
  }
@@ -106,5 +106,6 @@ export declare class JATSExporter {
106
106
  private moveCoiStatementToAuthorNotes;
107
107
  private updateFootnoteTypes;
108
108
  private fillEmptyFootnotes;
109
+ private fillEmptyFootnotesElements;
109
110
  }
110
111
  export {};
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": "2.3.4-LEAN-3579.0",
4
+ "version": "2.3.4-LEAN-3579.3",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",