Fix: Link containing only '-'

Issue #835 #876
This commit is contained in:
Tinmarino 2020-05-17 12:31:32 -04:00
parent c6564119b0
commit 3b5537f15a
2 changed files with 6 additions and 0 deletions

View File

@ -2123,6 +2123,10 @@ function! s:clean_url(url) abort
let url = substitute(url, '^//', '', '') let url = substitute(url, '^//', '', '')
let url = substitute(url, '^\([^/]\+\)\.\a\{2,4}/', '\1/', '') let url = substitute(url, '^\([^/]\+\)\.\a\{2,4}/', '\1/', '')
let url_l = split(url, '/\|=\|-\|&\|?\|\.') let url_l = split(url, '/\|=\|-\|&\|?\|\.')
" case only a '-'
if url_l == []
let url_l = [url]
endif
let url_l = filter(url_l, 'v:val !=# ""') let url_l = filter(url_l, 'v:val !=# ""')
if url_l[0] ==# 'www' if url_l[0] ==# 'www'
let url_l = url_l[1:] let url_l = url_l[1:]

View File

@ -3621,6 +3621,8 @@ Fixed:~
* Issue #404: Don't conceal strikethrough character in tables. * Issue #404: Don't conceal strikethrough character in tables.
* Issue #318: Markdown syntax bold, italic, and italic/bold are now * Issue #318: Markdown syntax bold, italic, and italic/bold are now
rendered correctly. rendered correctly.
* Issue #835: Pressing enter on the dash of a markdown list causes an error.
* Issue #876: E684: list index out of range: 0, when creating a link containing a `.`.
2.4 (2019-03-24)~ 2.4 (2019-03-24)~