@manuscripts/transform 2.3.2 → 2.3.3-LEAN-2746.0

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.
@@ -17,8 +17,7 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.title = void 0;
19
19
  exports.title = {
20
- content: 'text*',
21
- marks: 'italic smallcaps subscript superscript tracked_insert tracked_delete',
20
+ content: '(text | highlight_marker)*',
22
21
  attrs: {
23
22
  id: { default: '' },
24
23
  dataTracked: { default: null },
@@ -169,7 +169,9 @@ class Decoder {
169
169
  this.creators = {
170
170
  [json_schema_1.ObjectTypes.Titles]: (data) => {
171
171
  const model = data;
172
- return this.parseContents(model.title, 'div', undefined, {
172
+ const comments = this.createCommentNodes(model);
173
+ comments.forEach((c) => this.comments.set(c.attrs.id, c));
174
+ return this.parseContents(model.title, 'div', this.getComments(model), {
173
175
  topNode: schema_1.schema.nodes.title.create({
174
176
  id: model._id,
175
177
  }),
@@ -14,8 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export const title = {
17
- content: 'text*',
18
- marks: 'italic smallcaps subscript superscript tracked_insert tracked_delete',
17
+ content: '(text | highlight_marker)*',
19
18
  attrs: {
20
19
  id: { default: '' },
21
20
  dataTracked: { default: null },
@@ -160,7 +160,9 @@ export class Decoder {
160
160
  this.creators = {
161
161
  [ObjectTypes.Titles]: (data) => {
162
162
  const model = data;
163
- return this.parseContents(model.title, 'div', undefined, {
163
+ const comments = this.createCommentNodes(model);
164
+ comments.forEach((c) => this.comments.set(c.attrs.id, c));
165
+ return this.parseContents(model.title, 'div', this.getComments(model), {
164
166
  topNode: schema.nodes.title.create({
165
167
  id: model._id,
166
168
  }),
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.2",
4
+ "version": "2.3.3-LEAN-2746.0",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",