From 18c0cf55f4924de4f972d465889b99d304fce8f7 Mon Sep 17 00:00:00 2001 From: ashfinal Date: Fri, 16 Mar 2018 20:47:39 +0800 Subject: [PATCH] Adds emmet#anchorizeURL support for reStructuredText --- autoload/emmet.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/emmet.vim b/autoload/emmet.vim index 3169845..66eef9c 100644 --- a/autoload/emmet.vim +++ b/autoload/emmet.vim @@ -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('') let a.attr.href = url