Skip to content

Commit

Permalink
fix: drop alias for Juggl Links
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jul 6, 2021
1 parent 9400fa5 commit 011f7ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sharedFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit 011f7ad

Please sign in to comment.