@emberai-engg/task-board 0.3.4 → 0.3.5

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.
package/dist/index.js CHANGED
@@ -543,11 +543,15 @@ function formatDateTime(dateStr) {
543
543
  minute: "2-digit"
544
544
  });
545
545
  }
546
+ function stripMentionMarkup(text) {
547
+ return text.replace(/@\[(.*?)\]\(.*?\)/g, "@$1");
548
+ }
546
549
  function getDescriptionPreview(desc) {
547
550
  if (!desc) return "";
548
- if (typeof desc === "string") return desc;
551
+ if (typeof desc === "string") return stripMentionMarkup(desc);
549
552
  for (const section of DESCRIPTION_SECTIONS) {
550
- if (desc[section.key]?.trim()) return desc[section.key].trim();
553
+ const val = desc[section.key]?.trim();
554
+ if (val) return stripMentionMarkup(val);
551
555
  }
552
556
  return "";
553
557
  }