From 138965a764e41eddd0cff2e4f2537fc78ee0fe67 Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Mon, 15 Feb 2021 19:41:27 +0100 Subject: [PATCH] Add failing testcase for files with underscores --- tests/testdata/expected/main-samples/obsidian-wikilinks.md | 2 ++ tests/testdata/input/main-samples/_underscored-note.md | 3 +++ tests/testdata/input/main-samples/obsidian-wikilinks.md | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 tests/testdata/input/main-samples/_underscored-note.md diff --git a/tests/testdata/expected/main-samples/obsidian-wikilinks.md b/tests/testdata/expected/main-samples/obsidian-wikilinks.md index a27bd59..f0acd34 100644 --- a/tests/testdata/expected/main-samples/obsidian-wikilinks.md +++ b/tests/testdata/expected/main-samples/obsidian-wikilinks.md @@ -8,6 +8,8 @@ Link to [pure markdown examples](pure-markdown-examples.md#heading-1). Link to [uppercased-note](Uppercased-note.md). +Link to [\_underscored-note](_underscored-note.md). + Link within backticks: `[[pure-markdown-examples]]` ```` diff --git a/tests/testdata/input/main-samples/_underscored-note.md b/tests/testdata/input/main-samples/_underscored-note.md new file mode 100644 index 0000000..8537cd9 --- /dev/null +++ b/tests/testdata/input/main-samples/_underscored-note.md @@ -0,0 +1,3 @@ +Older versions of obsidian-export contained a bug where files beginning with an underscore wouldn't get resolved correctly. + +This file, and the link to it in `obsidian-wikilinks.md`, serves as a regression test for this issue. diff --git a/tests/testdata/input/main-samples/obsidian-wikilinks.md b/tests/testdata/input/main-samples/obsidian-wikilinks.md index 543d9bc..3c98786 100644 --- a/tests/testdata/input/main-samples/obsidian-wikilinks.md +++ b/tests/testdata/input/main-samples/obsidian-wikilinks.md @@ -8,6 +8,8 @@ Link to [[pure-markdown-examples#Heading 1|pure markdown examples]]. Link to [[uppercased-note]]. +Link to [[_underscored-note]]. + Link within backticks: `[[pure-markdown-examples]]` ```