diff --git a/Tests/ComplTests.fs b/Tests/ComplTests.fs index c8d9954..914136c 100644 --- a/Tests/ComplTests.fs +++ b/Tests/ComplTests.fs @@ -592,6 +592,17 @@ module Candidates = checkSnapshot (findCandidatesInDoc folder doc2 (Position.Mk(0, 14))) + [] + let wiki_CrossHeading_TitleNameVsSlug () = + let d1 = + FakeDoc.Mk(path = "d1.md", contentLines = [| "# Doc Title"; "## Subtitle" |]) + // 01234567890123 + let d2 = FakeDoc.Mk(path = "d2.md", contentLines = [| "[[Doc Title#]]" |]) + + let folder = FakeFolder.Mk([ d1; d2 ]) + + checkSnapshot (findCandidatesInDoc folder d2 (Position.Mk(0, 12))) + [] module Tags = let doc1 = diff --git a/Tests/_snapshots/Candidates.json b/Tests/_snapshots/Candidates.json index 2d4e4bc..facf8ca 100644 --- a/Tests/_snapshots/Candidates.json +++ b/Tests/_snapshots/Candidates.json @@ -113,5 +113,10 @@ "AutoGenerated": [ "(7,2)-(7,3): #H2 / #H2" ] + }, + "wiki_CrossHeading_TitleNameVsSlug": { + "AutoGenerated": [ + "(0,2)-(0,12): doc-title#Subtitle / doc-title#Subtitle" + ] } } \ No newline at end of file