mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
v1.1.0 - View mode, daily notes, tag management, math support, and more
This commit is contained in:
@@ -91,7 +91,12 @@
|
||||
let match;
|
||||
wikiLinkRegex.lastIndex = 0;
|
||||
while ((match = wikiLinkRegex.exec(body)) !== null) {
|
||||
const linkTitle = match[1].trim().toLowerCase();
|
||||
// Handle Obsidian syntax: strip |alias, #heading, ^block
|
||||
let rawLink = match[1].trim();
|
||||
const pipeIdx = rawLink.indexOf('|');
|
||||
if (pipeIdx >= 0) rawLink = rawLink.slice(0, pipeIdx).trim();
|
||||
rawLink = rawLink.replace(/#.*$/, '').replace(/\^.*$/, '').trim();
|
||||
const linkTitle = rawLink.toLowerCase();
|
||||
const targetIdx = nodeIndexMap.get(linkTitle);
|
||||
if (linkTitle !== node.id && targetIdx !== undefined) {
|
||||
const edgeKey = nodeIdx < targetIdx ? `${nodeIdx}|${targetIdx}` : `${targetIdx}|${nodeIdx}`;
|
||||
|
||||
Reference in New Issue
Block a user