@manuscripts/transform 3.0.63-LEAN-4375.0 → 3.0.63

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.
@@ -1227,9 +1227,10 @@ class JATSExporter {
1227
1227
  };
1228
1228
  this.appendParagraphToElement = (paragraph, element) => {
1229
1229
  const parsedDoc = new DOMParser().parseFromString(paragraph.textContent, 'text/html');
1230
- if (parsedDoc.body.innerHTML.length) {
1230
+ const parsedParagraph = parsedDoc.body.querySelector('p');
1231
+ if (parsedParagraph) {
1231
1232
  const paragraphEl = this.createElement('p');
1232
- paragraphEl.innerHTML = parsedDoc.body.innerHTML;
1233
+ paragraphEl.innerHTML = parsedParagraph.innerHTML;
1233
1234
  paragraphEl.setAttribute('id', normalizeID(paragraph.attrs.id));
1234
1235
  element.appendChild(paragraphEl);
1235
1236
  }
@@ -337,11 +337,6 @@ class JATSDOMParser {
337
337
  };
338
338
  },
339
339
  },
340
- {
341
- tag: 'fn[fn-type]',
342
- context: 'author_notes/',
343
- ignore: true,
344
- },
345
340
  {
346
341
  tag: 'fn:not([fn-type])',
347
342
  node: 'footnote',
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.link = void 0;
18
+ exports.isLinkNode = exports.link = void 0;
19
19
  exports.link = {
20
20
  content: 'inline*',
21
21
  attrs: {
@@ -58,3 +58,5 @@ exports.link = {
58
58
  return ['a', attrs, 0];
59
59
  },
60
60
  };
61
+ const isLinkNode = (node) => node.type === node.type.schema.nodes.link;
62
+ exports.isLinkNode = isLinkNode;
@@ -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 = "3.0.63-LEAN-4375.0";
4
+ exports.VERSION = "3.0.63";
@@ -1219,9 +1219,10 @@ export class JATSExporter {
1219
1219
  };
1220
1220
  this.appendParagraphToElement = (paragraph, element) => {
1221
1221
  const parsedDoc = new DOMParser().parseFromString(paragraph.textContent, 'text/html');
1222
- if (parsedDoc.body.innerHTML.length) {
1222
+ const parsedParagraph = parsedDoc.body.querySelector('p');
1223
+ if (parsedParagraph) {
1223
1224
  const paragraphEl = this.createElement('p');
1224
- paragraphEl.innerHTML = parsedDoc.body.innerHTML;
1225
+ paragraphEl.innerHTML = parsedParagraph.innerHTML;
1225
1226
  paragraphEl.setAttribute('id', normalizeID(paragraph.attrs.id));
1226
1227
  element.appendChild(paragraphEl);
1227
1228
  }
@@ -334,11 +334,6 @@ export class JATSDOMParser {
334
334
  };
335
335
  },
336
336
  },
337
- {
338
- tag: 'fn[fn-type]',
339
- context: 'author_notes/',
340
- ignore: true,
341
- },
342
337
  {
343
338
  tag: 'fn:not([fn-type])',
344
339
  node: 'footnote',
@@ -55,3 +55,4 @@ export const link = {
55
55
  return ['a', attrs, 0];
56
56
  },
57
57
  };
58
+ export const isLinkNode = (node) => node.type === node.type.schema.nodes.link;
@@ -1 +1 @@
1
- export const VERSION = "3.0.63-LEAN-4375.0";
1
+ export const VERSION = "3.0.63";
@@ -23,4 +23,5 @@ export interface LinkNode extends ManuscriptNode {
23
23
  attrs: Attrs;
24
24
  }
25
25
  export declare const link: NodeSpec;
26
+ export declare const isLinkNode: (node: ManuscriptNode) => node is LinkNode;
26
27
  export {};
@@ -1 +1 @@
1
- export declare const VERSION = "3.0.63-LEAN-4375.0";
1
+ export declare const VERSION = "3.0.63";
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": "3.0.63-LEAN-4375.0",
4
+ "version": "3.0.63",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",