Reference

Summary

How to get references to symbols

Lifecycle

  • src/utils/md.ts
getReferenceAtPosition(document, position) { 
    ...
    rangeWithLink := getWordRangeAtPosition(position)
    if (!rangeWithLink) { 
        ...
    }

    refText := rangeWithLink
    clean = parseRef(refText)
    ...
    return clean
}

parseRef { 
    parseNoteRef { 

    }
}
  • engine-server/src/markdown/remark/utils.ts
parseNoteRef(ref) { 
    parseNoteRefRaw(ref)

}

parseNoteRefRaw(ref) { 
    vaultName, link := parseDendronURI(ref)

}