Skip to content

Commit 62996e5

Browse files
committed
vault: Enable manual exploratory testing of relative links on task lines
1 parent 5fd9df5 commit 62996e5

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

resources/sample_vaults/Tasks-Demo/Test Data/internal_heading_links.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ This file contains test cases for internal heading links in tasks.
4141
## Escaped Links
4242

4343
- [ ] #task Task with \[\[#Escaped Links\]\] escaped link
44+
45+
## Search
46+
47+
Hover over each heading in these tasks, and to make the Page Preview plugin show that the links exist.
48+
49+
```tasks
50+
path includes {{query.file.path}}
51+
group by heading
52+
hide backlinks
53+
```

tests/Obsidian/__test_data__/internal_heading_links.json

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,22 @@
192192
"offset": 902
193193
}
194194
}
195+
},
196+
{
197+
"heading": "Search",
198+
"level": 2,
199+
"position": {
200+
"end": {
201+
"col": 9,
202+
"line": 44,
203+
"offset": 988
204+
},
205+
"start": {
206+
"col": 0,
207+
"line": 44,
208+
"offset": 979
209+
}
210+
}
195211
}
196212
],
197213
"links": [
@@ -859,6 +875,51 @@
859875
}
860876
},
861877
"type": "list"
878+
},
879+
{
880+
"position": {
881+
"end": {
882+
"col": 9,
883+
"line": 44,
884+
"offset": 988
885+
},
886+
"start": {
887+
"col": 0,
888+
"line": 44,
889+
"offset": 979
890+
}
891+
},
892+
"type": "heading"
893+
},
894+
{
895+
"position": {
896+
"end": {
897+
"col": 102,
898+
"line": 46,
899+
"offset": 1092
900+
},
901+
"start": {
902+
"col": 0,
903+
"line": 46,
904+
"offset": 990
905+
}
906+
},
907+
"type": "paragraph"
908+
},
909+
{
910+
"position": {
911+
"end": {
912+
"col": 3,
913+
"line": 52,
914+
"offset": 1172
915+
},
916+
"start": {
917+
"col": 0,
918+
"line": 48,
919+
"offset": 1094
920+
}
921+
},
922+
"type": "code"
862923
}
863924
],
864925
"tags": [
@@ -1014,7 +1075,7 @@
10141075
}
10151076
]
10161077
},
1017-
"fileContents": "# Internal Heading Links Test\n\nThis file contains test cases for internal heading links in tasks.\n\n## Simple Headers\n\n## Another Header\n\n## Basic Internal Links\n\n- [ ] #task Task with<br>[[#Basic Internal Links]]\n\n## Multiple Links In One Task\n\n- [ ] #task Task with<br>[[#Multiple Links In One Task]] and<br>[[#Simple Headers]]\n\n## External File Links\n\n- [ ] #task Task with<br>[[Other File]]\n\n## Mixed Link Types\n\n- [ ] #task Task with<br>[[Other File]] and<br>[[#Mixed Link Types]]\n\n## Header Links With File Reference\n\n- [ ] #task<br>[[#Header Links With File Reference]] then<br>[[Other File#Some Header]] and<br>[[#Another Header]]\n\n## Headers-With_Special Characters\n\n- [ ] #task Task with<br>[[#Headers-With_Special Characters]]\n\n## Aliased Links\n\n- [ ] #task Task with<br>[[#Aliased Links|I am an alias]]\n\n## Links In Code Blocks\n\n- [ ] #task Task with `[[#Links In Code Blocks]]` code block\n\n## Escaped Links\n\n- [ ] #task Task with \\[\\[#Escaped Links\\]\\] escaped link\n",
1078+
"fileContents": "# Internal Heading Links Test\n\nThis file contains test cases for internal heading links in tasks.\n\n## Simple Headers\n\n## Another Header\n\n## Basic Internal Links\n\n- [ ] #task Task with<br>[[#Basic Internal Links]]\n\n## Multiple Links In One Task\n\n- [ ] #task Task with<br>[[#Multiple Links In One Task]] and<br>[[#Simple Headers]]\n\n## External File Links\n\n- [ ] #task Task with<br>[[Other File]]\n\n## Mixed Link Types\n\n- [ ] #task Task with<br>[[Other File]] and<br>[[#Mixed Link Types]]\n\n## Header Links With File Reference\n\n- [ ] #task<br>[[#Header Links With File Reference]] then<br>[[Other File#Some Header]] and<br>[[#Another Header]]\n\n## Headers-With_Special Characters\n\n- [ ] #task Task with<br>[[#Headers-With_Special Characters]]\n\n## Aliased Links\n\n- [ ] #task Task with<br>[[#Aliased Links|I am an alias]]\n\n## Links In Code Blocks\n\n- [ ] #task Task with `[[#Links In Code Blocks]]` code block\n\n## Escaped Links\n\n- [ ] #task Task with \\[\\[#Escaped Links\\]\\] escaped link\n\n## Search\n\nHover over each heading in these tasks, and to make the Page Preview plugin show that the links exist.\n\n```tasks\npath includes {{query.file.path}}\ngroup by heading\nhide backlinks\n```\n",
10181079
"filePath": "Test Data/internal_heading_links.md",
10191080
"getAllTags": [
10201081
"#task",

0 commit comments

Comments
 (0)