@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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -466,11 +466,15 @@ function formatDateTime(dateStr) {
|
|
|
466
466
|
minute: "2-digit"
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
+
function stripMentionMarkup(text) {
|
|
470
|
+
return text.replace(/@\[(.*?)\]\(.*?\)/g, "@$1");
|
|
471
|
+
}
|
|
469
472
|
function getDescriptionPreview(desc) {
|
|
470
473
|
if (!desc) return "";
|
|
471
|
-
if (typeof desc === "string") return desc;
|
|
474
|
+
if (typeof desc === "string") return stripMentionMarkup(desc);
|
|
472
475
|
for (const section of DESCRIPTION_SECTIONS) {
|
|
473
|
-
|
|
476
|
+
const val = desc[section.key]?.trim();
|
|
477
|
+
if (val) return stripMentionMarkup(val);
|
|
474
478
|
}
|
|
475
479
|
return "";
|
|
476
480
|
}
|