Modify regex pattern for markdown links.

Fixes #240. Also fixes a related issue where markdown links where not
correctly highlighted in todo lists. Adds concealment for markdown links
in todo lists.
This commit is contained in:
Rane Brown 2019-05-08 20:55:56 -06:00
parent 0d8fbebcb8
commit cde4703354
3 changed files with 8 additions and 6 deletions

View File

@ -786,7 +786,7 @@ function! s:populate_extra_markdown_vars()
\ mkd_syntax.rxWeblink1Separator. '__LinkUrl__'. mkd_syntax.rxWeblink1Ext.
\ '#__LinkAnchor__'. mkd_syntax.rxWeblink1Suffix
let valid_chars = '[^\\]'
let valid_chars = '[^\\\]]'
let mkd_syntax.rxWeblink1Prefix = vimwiki#u#escape(mkd_syntax.rxWeblink1Prefix)
let mkd_syntax.rxWeblink1Suffix = vimwiki#u#escape(mkd_syntax.rxWeblink1Suffix)

View File

@ -3487,6 +3487,8 @@ Removed:~
point.
Fixed:~
* Issue #240: Fix regex pattern for markdown '[]()' links
* Issue #685: Error message for invalid user options fixed.
* Issue #481: Allow surrounding URLs with '<' '>'
* Issue #237: VimwikiRenameLink now works for Markdown syntax
* Issue #612: GVim menu displayed duplicate names.

View File

@ -262,11 +262,11 @@ if vimwiki#vars#get_global('hl_cb_checked') == 1
execute 'syntax match VimwikiCheckBoxDone /'.vimwiki#vars#get_syntaxlocal('rxListItemWithoutCB')
\ . '\s*\[['.vimwiki#vars#get_syntaxlocal('listsyms_list')[-1]
\ . vimwiki#vars#get_global('listsym_rejected')
\ . ']\]\s.*$/ contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
\ . ']\]\s.*$/ contains=VimwikiNoExistsLink,VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,@Spell'
elseif vimwiki#vars#get_global('hl_cb_checked') == 2
execute 'syntax match VimwikiCheckBoxDone /'
\ . vimwiki#vars#get_syntaxlocal('rxListItemAndChildren')
\ .'/ contains=VimwikiNoExistsLink,VimwikiLink,@Spell'
\ .'/ contains=VimwikiNoExistsLink,VimwikiLink,VimwikiWeblink1,VimwikiWikiLink1,@Spell'
endif