From fef56a03fc3c1b44aa486393a3da1945fc7ac7ac Mon Sep 17 00:00:00 2001 From: Mateusz Titz Date: Wed, 8 Jan 2025 12:20:08 +0100 Subject: [PATCH] Add support for short mentions from ExpensiMark (#592) --- src/commonTypes.ts | 1 + src/parseExpensiMark.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/commonTypes.ts b/src/commonTypes.ts index 73edbf39..a7cb9e01 100644 --- a/src/commonTypes.ts +++ b/src/commonTypes.ts @@ -5,6 +5,7 @@ type MarkdownType = | 'emoji' | 'mention-here' | 'mention-user' + | 'mention-short' | 'mention-report' | 'link' | 'code' diff --git a/src/parseExpensiMark.ts b/src/parseExpensiMark.ts index ecdbbd20..37216d11 100644 --- a/src/parseExpensiMark.ts +++ b/src/parseExpensiMark.ts @@ -155,6 +155,8 @@ function parseTreeToTextAndRanges(tree: StackItem): [string, MarkdownRange[]] { addChildrenWithStyle(node, 'mention-here'); } else if (node.tag === '') { addChildrenWithStyle(node, 'mention-user'); + } else if (node.tag === '') { + addChildrenWithStyle(node, 'mention-short'); } else if (node.tag === '') { addChildrenWithStyle(node, 'mention-report'); } else if (node.tag === '
') {