Fix resolution of leading-slash links, add link tests (#1108)
Hopefully this solves #1084, "Page links with leading slash lead to a
file in working directory, not a page at the root of the wiki", introduced
in 850aace.
It also adds a set of tests for different kinds of wiki links:
- api_base_resolve_link.vader
- link_syntax_markdown.vader
- link_syntax_vimwiki.vader
Includes some fixes for locally-failing tests, removes a test from
test/map.vader and comments out test/config_vars.vader entirely for the
moment.
Code by : Brennen Bearnes <code@p1k3.com>
This commit is contained in:
+8
-2
@@ -1054,13 +1054,17 @@ absolute to the wiki root directory, that is, the link [[/index]] always opens
|
||||
the file /path/to/your/wiki/index.wiki, no matter in which subdirectory you
|
||||
are currently in.
|
||||
|
||||
If you want an absolute path in your local box you can prefix the path
|
||||
with // >
|
||||
If you want to use an absolute path to a wiki page on your local filesystem,
|
||||
you can prefix the path with // >
|
||||
[[//absolute_path]]
|
||||
For example: >
|
||||
[[///tmp/in_root_tmp]]
|
||||
[[//~/in_home_dir]]
|
||||
[[//$HOME/in_home_dir]]
|
||||
In a wiki with the default wiki extension, this link: >
|
||||
[[///tmp/foo]]
|
||||
Links to the file: >
|
||||
/tmp/foo.wiki
|
||||
|
||||
Links to subdirectories inside the wiki directory are also supported. They
|
||||
end with a "/": >
|
||||
@@ -3894,6 +3898,7 @@ Contributors and their Github usernames in roughly chronological order:
|
||||
- Yifan Hu (@yhu266)
|
||||
- Levi Rizki Saputra (@levirs565)
|
||||
- Fergus Collins (@C-Fergus)
|
||||
- Brennen Bearnes
|
||||
|
||||
==============================================================================
|
||||
16. Changelog *vimwiki-changelog*
|
||||
@@ -3955,6 +3960,7 @@ Changed:~
|
||||
Removed:~
|
||||
|
||||
Fixed:~
|
||||
* PR #1108: Fix resolution of leading-slash page links, add link tests
|
||||
* Allow title values with quotes
|
||||
* Enable strikethrough for Neovim
|
||||
* Issue #1029: Fix: error loading plugin when lang uses comma instead of
|
||||
|
||||
Reference in New Issue
Block a user