vimwiki-backup / vimwiki

Automatically exported from code.google.com/p/vimwiki
1 stars 1 forks source link

markdown link is not supported #395

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.i use vimwiki in markdown syntax.
2.when I place my cursor on a word(e.g 'hello') and press Enter to create a 
link, 'hello' becomes '[[hello]]'
3.the expected output should be '[hello](hello.md)'

Please provide any additional information below.

however, when I place my cursor on '[hello](hello.md)' and press Enter, it 
creates a new file named 'hello.md.md'!(notice the double 'md').

Original issue reported on code.google.com by 768442...@qq.com on 23 Dec 2012 at 1:46

GoogleCodeExporter commented 8 years ago
In the first case, you have highlighted a feature of vimwiki that enables fluid 
creation of inter-page "wikilinks" which are not defined by the markdown 
standard, but are used by several extensions to the standard.  The output you 
expected, while convenient for some, is not consistent and is a challenge to 
support with existing vimwiki conventions.

In your second example, because vimwiki does not detect a scheme ("http:", 
"ftp:", ..) component in the url, it defaults to "wikilink" behavior.  
Admittedly, this may not be the most consistent behavior from the perspective 
of a markdown author, but it does help keep the code simple, and this fact 
alone will likely continue to exert an influence vimwiki's future.  

Original comment by stu.andrews on 27 Dec 2012 at 3:38

GoogleCodeExporter commented 8 years ago

Original comment by stu.andrews on 27 Dec 2012 at 8:54

GoogleCodeExporter commented 8 years ago
thank you! The markdown syntax is so popular that I hope there will be a tool 
named "vimmark" someday...but now wiki syntax is also ok for my daily work.

Original comment by 768442...@qq.com on 29 Dec 2012 at 12:19

GoogleCodeExporter commented 8 years ago

Original comment by stu.andrews on 31 Dec 2012 at 4:50

GoogleCodeExporter commented 8 years ago
The problem is that if you push files to github.com, the syntax 
'[hello](hello)' fails with 404 when surfing in your web. e.g.: 
https://github.com/username/vimwiki/blob/master/index.md to press 'hello' link.

To operate in github need it '[hello](hello.md)'.

Thanks

Original comment by png1...@gmail.com on 14 Jan 2013 at 5:57

GoogleCodeExporter commented 8 years ago
hey, png1...@gmail.com, I came up with some hacks to solve your problem. Not 
elegant and it actually lose some felexibility, but it works.

create a reference-style link and leave out the id, for your case, 
[hello][]

[hello]: hello.md

and <CR> on [hello][] will create/follow to 'hello.md' file.
when generated as html, it also a link to hello.md.

I tested it on pelican

Original comment by yuec...@gmail.com on 7 Mar 2013 at 11:43