@@ -68,6 +68,11 @@ if exists("g:pandoc#syntax#conceal#cchar_overrides")
68
68
let s: cchars = extend (s: cchars , g: pandoc #syntax #conceal#cchar_overrides)
69
69
endif
70
70
" }}}2
71
+ " should the urls in links be concealed? {{{2
72
+ if ! exists (" g:pandoc#syntax#conceal#urls" )
73
+ let g: pandoc #syntax #conceal#urls = 0
74
+ endif
75
+ " }}}2
71
76
" leave specified codeblocks as Normal (i.e. 'unhighlighted') {{{2
72
77
if ! exists (" g:pandoc#syntax#codeblocks#ignore" )
73
78
let g: pandoc #syntax #codeblocks#ignore = []
@@ -216,7 +221,11 @@ syn region pandocCodeBlockInsideIndent start=/\(\(\d\|\a\|*\).*\n\)\@<!\(^\(\s
216
221
"
217
222
" Base: {{{2
218
223
syn region pandocReferenceLabel matchgroup =Operator start =/ !\{ ,1}\[ / skip =/ \]\]\@ =/ end =/ \] / keepend display
219
- syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display
224
+ if g: pandoc #syntax #conceal#urls == 1
225
+ syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display conceal
226
+ else
227
+ syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display
228
+ endif
220
229
" let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
221
230
syn match pandocNoLabel / \]\@ 1<!\s *\[ [^\[\] ]\{ -}\]\s *[\[ (]\@ !/ contains =pandocPCite
222
231
syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell display
@@ -533,7 +542,7 @@ if g:pandoc#syntax#style#emphases == 1
533
542
if ! exists (' s:hi_tail' )
534
543
for s: i in [" fg" , " bg" ]
535
544
let s: tmp_val = synIDattr (synIDtrans (hlID (" String" )), s: i )
536
- let s: tmp_ui = has (' gui_running' ) ? ' gui' : ' cterm'
545
+ let s: tmp_ui = has (' gui_running' ) ? ' gui' : ' cterm'
537
546
if ! empty (s: tmp_val ) && s: tmp_val != -1
538
547
exe ' let s:' .s: i . ' = "' .s: tmp_ui .s: i .' =' .s: tmp_val .' "'
539
548
else
0 commit comments