1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
Before:
unlet! b:link_disable_internal_links
unlet! g:link_disable_internal_links
After:
unlet! b:link_disable_internal_links
unlet! g:link_disable_internal_links
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given markdown (URLs in varying formats; internal links included):
[foo](www.bar.com)
[foo](ftp://ftp.bar.net)
[foo](file://path/to/file.txt)
[foo](http://www.bar.com)
[foo](https://bar.org)
[foo](http://192.0.2.1)
[foo](http://subdomain.bar.com)
[foo](https://bar.travel)
[foo](http://bar.very123longtld)
[foo](http://www.ba-r.com)
[foo](http://bar.com:8080)
[foo](http://bar.com/baz)
[foo](http://bar.com/index.html)
[foo](http://www.parameters.org/page2014.html?utm_source=facebook&utm_medium=eventlinkonwall&utm_term=trapshoot&utm_content=calendar_event_on_wall&utm_campaign=trapshoot2014)
[foo](bar)
[foo](bar.com)
[literal-asterisk](https://example.com/files/*/index.html)
[encoded-asterisk](https://example.net/query?value=%2A)
[tilde](https://domain.com/~user)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Execute:
LinkConvertAll
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expect markdown:
[foo][0]
[foo][1]
[foo][2]
[foo][3]
[foo][4]
[foo][5]
[foo][6]
[foo][7]
[foo][8]
[foo][9]
[foo][10]
[foo][11]
[foo][12]
[foo][13]
[foo][14]
[foo][15]
[literal-asterisk][16]
[encoded-asterisk][17]
[tilde][18]
## Links
[0]: www.bar.com
[1]: ftp://ftp.bar.net
[2]: file://path/to/file.txt
[3]: http://www.bar.com
[4]: https://bar.org
[5]: http://192.0.2.1
[6]: http://subdomain.bar.com
[7]: https://bar.travel
[8]: http://bar.very123longtld
[9]: http://www.ba-r.com
[10]: http://bar.com:8080
[11]: http://bar.com/baz
[12]: http://bar.com/index.html
[13]: http://www.parameters.org/page2014.html?utm_source=facebook&utm_medium=eventlinkonwall&utm_term=trapshoot&utm_content=calendar_event_on_wall&utm_campaign=trapshoot2014
[14]: bar
[15]: bar.com
[16]: https://example.com/files/*/index.html
[17]: https://example.net/query?value=%2A
[18]: https://domain.com/~user
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given markdown:
[foo](www.bar.com)
[foo](ftp://ftp.bar.net)
[foo](file://path/to/file.txt)
[foo](http://www.bar.com)
[foo](https://bar.org)
[foo](http://192.0.2.1)
[foo](http://subdomain.bar.com)
[foo](https://bar.travel)
[foo](http://bar.very123longtld)
[foo](http://www.ba-r.com)
[foo](http://bar.com:8080)
[foo](http://bar.com/baz)
[foo](http://bar.com/index.html)
[foo](http://www.parameters.org/page2014.html?utm_source=facebook&utm_medium=eventlinkonwall&utm_term=trapshoot&utm_content=calendar_event_on_wall&utm_campaign=trapshoot2014)
[foo](bar)
[foo](bar.com)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Execute (URLs in varying formats; internal links disabled):
let g:link_disable_internal_links = 1
LinkConvertAll
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expect markdown:
[foo](www.bar.com)
[foo][0]
[foo][1]
[foo][2]
[foo][3]
[foo][4]
[foo][5]
[foo][6]
[foo][7]
[foo][8]
[foo][9]
[foo][10]
[foo][11]
[foo][12]
[foo](bar)
[foo](bar.com)
## Links
[0]: ftp://ftp.bar.net
[1]: file://path/to/file.txt
[2]: http://www.bar.com
[3]: https://bar.org
[4]: http://192.0.2.1
[5]: http://subdomain.bar.com
[6]: https://bar.travel
[7]: http://bar.very123longtld
[8]: http://www.ba-r.com
[9]: http://bar.com:8080
[10]: http://bar.com/baz
[11]: http://bar.com/index.html
[12]: http://www.parameters.org/page2014.html?utm_source=facebook&utm_medium=eventlinkonwall&utm_term=trapshoot&utm_content=calendar_event_on_wall&utm_campaign=trapshoot2014
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|