diff --git a/common/changes/@hcengineering/text-markdown/fix-markdown-inline-comment-mark_2026-05-28-13-02.json b/common/changes/@hcengineering/text-markdown/fix-markdown-inline-comment-mark_2026-05-28-13-02.json new file mode 100644 index 0000000..7021822 --- /dev/null +++ b/common/changes/@hcengineering/text-markdown/fix-markdown-inline-comment-mark_2026-05-28-13-02.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "Fix markdown serialization for inline comment marks.", + "type": "patch", + "packageName": "@hcengineering/text-markdown" + } + ], + "packageName": "@hcengineering/text-markdown", + "email": "igor.loskutoff@gmail.com" +} diff --git a/packages/text-markdown/src/__tests__/markdown.test.ts b/packages/text-markdown/src/__tests__/markdown.test.ts index 1068e7b..d905ee2 100644 --- a/packages/text-markdown/src/__tests__/markdown.test.ts +++ b/packages/text-markdown/src/__tests__/markdown.test.ts @@ -1100,6 +1100,32 @@ describe('markupToMarkdown', () => { } ] } + }, + { + name: 'inline comment mark', + markdown: 'commented text', + markup: { + type: MarkupNodeType.doc, + content: [ + { + type: MarkupNodeType.paragraph, + content: [ + { + type: MarkupNodeType.text, + text: 'commented text', + marks: [ + { + type: 'inline-comment', + attrs: { + thread: 'thread-1' + } + } + ] + } + ] + } + ] + } } ] diff --git a/packages/text-markdown/src/serializer.ts b/packages/text-markdown/src/serializer.ts index ed49060..ab0e186 100644 --- a/packages/text-markdown/src/serializer.ts +++ b/packages/text-markdown/src/serializer.ts @@ -421,6 +421,13 @@ export const storeMarks: Record = { mixable: false, expelEnclosingWhitespace: false, escape: false + }, + 'inline-comment': { + open: '', + close: '', + mixable: false, + expelEnclosingWhitespace: false, + escape: true } }