File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,22 @@ describe('accessing links in file', function () {
616616
617617 const cachedMetadata : CachedMetadata = task . file . cachedMetadata ;
618618
619+ /**
620+ * I am thinking of the following, to evantually make links accessible to users.
621+ * 1. Provide a class or interface called Link, with fields:
622+ * - displayText, e.g. "link_in_yaml"
623+ * - link, e.g. "link_in_yaml"
624+ * - original, e.g. "[[link_in_yaml]]"
625+ * 2. Add some getters that construct the relevant Link objects from cached metadata on demand, such as:
626+ * - task.file.linksInBody
627+ * - task.file.linksInFrontMatter
628+ * - task.file.allLinks
629+ * - task.links
630+ * 3. Consider the vocabulary - some dataview users talk about inlines and outlinks.
631+ * The above are all outlinks - but do we want to name them as such, to prepare
632+ * for if or when inlinks are also supported?
633+ */
634+
619635 it ( 'see source' , ( ) => {
620636 expect ( data . fileContents ) . toMatchInlineSnapshot ( `
621637 "---
You can’t perform that action at this time.
0 commit comments