@manuscripts/transform 1.4.0 → 1.4.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.
@@ -151,6 +151,8 @@ class Decoder {
151
151
  },
152
152
  [json_schema_1.ObjectTypes.BibliographyItem]: (data) => {
153
153
  const model = data;
154
+ const commentNodes = this.createCommentsNode(model);
155
+ commentNodes.forEach((c) => this.comments.set(c.attrs.id, c));
154
156
  return schema_1.schema.nodes.bibliography_item.create({
155
157
  id: model._id,
156
158
  type: model.type,
@@ -164,6 +166,7 @@ class Decoder {
164
166
  page: model.page,
165
167
  title: model.title,
166
168
  literal: model.literal,
169
+ comments: commentNodes.map((c) => c.attrs.id),
167
170
  });
168
171
  },
169
172
  [object_types_1.ExtraObjectTypes.PlaceholderElement]: (data) => {
@@ -141,6 +141,8 @@ export class Decoder {
141
141
  },
142
142
  [ObjectTypes.BibliographyItem]: (data) => {
143
143
  const model = data;
144
+ const commentNodes = this.createCommentsNode(model);
145
+ commentNodes.forEach((c) => this.comments.set(c.attrs.id, c));
144
146
  return schema.nodes.bibliography_item.create({
145
147
  id: model._id,
146
148
  type: model.type,
@@ -154,6 +156,7 @@ export class Decoder {
154
156
  page: model.page,
155
157
  title: model.title,
156
158
  literal: model.literal,
159
+ comments: commentNodes.map((c) => c.attrs.id),
157
160
  });
158
161
  },
159
162
  [ExtraObjectTypes.PlaceholderElement]: (data) => {
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.0",
4
+ "version": "1.4.1",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",