From 011f7add7c73ba4a69927e348e0f3713f099e448 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Tue, 6 Jul 2021 13:16:34 +0200 Subject: [PATCH] fix: drop alias for Juggl Links --- src/sharedFunctions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sharedFunctions.ts b/src/sharedFunctions.ts index 2a9cd5a9..886a1364 100644 --- a/src/sharedFunctions.ts +++ b/src/sharedFunctions.ts @@ -82,7 +82,10 @@ export async function getJugglLinks( const lineNo = link.position.start.line; const line = content.split('\n')[lineNo] - const linksInLine = line.match(splitLinksRegex)?.map(link => link.slice(2, link.length - 2)) ?? [] + const linksInLine = line + .match(splitLinksRegex) + ?.map(link => link.slice(2, link.length - 2)) + ?.map(innerText => innerText.split('|')[0]) ?? [] const parsedLinks = parseTypedLink(link, line, '-'); jugglLink.links.push({ type: parsedLinks?.properties?.type ?? '', linksInLine })