Merge pull request #410 from ashfinal/master

Adds emmet#anchorizeURL support for reStructuredText
This commit is contained in:
mattn
2018-04-25 09:03:40 +09:00
committed by GitHub

View File

@@ -856,6 +856,8 @@ function! emmet#anchorizeURL(flag) abort
let rtype = emmet#lang#type(type)
if &filetype ==# 'markdown'
let expand = printf('[%s](%s)', substitute(title, '[\[\]]', '\\&', 'g'), url)
elseif &filetype ==# 'rst'
let expand = printf('`%s <%s>`_', substitute(title, '[\[\]]', '\\&', 'g'), url)
elseif a:flag ==# 0
let a = emmet#lang#html#parseTag('<a>')
let a.attr.href = url