From 5283d3778f633d80d1872cce98a0b950c2bb9af3 Mon Sep 17 00:00:00 2001 From: Mateusz Titz Date: Tue, 31 Dec 2024 11:30:40 +0100 Subject: [PATCH] Add support for short mentions from Expensimark --- src/commonTypes.ts | 1 + src/parseExpensiMark.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/commonTypes.ts b/src/commonTypes.ts index 73edbf39b..a7cb9e018 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 cbf69845b..b87b39d19 100644 --- a/src/parseExpensiMark.ts +++ b/src/parseExpensiMark.ts @@ -154,6 +154,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 === '
') {