Merge branch 'md_bold_italics' into dev
This fixes Markdown syntax for bold, italic, and bold_italic. With these changes **bold** and __bold__, *italic* and _italic_, and ***bold_italic*** and ___italic_bold___ are shown correctly. This closes #23, closes #189, closes #318, and closes #576.
This commit is contained in:
commit
f40f054441
@ -877,6 +877,12 @@ is decorated: >
|
||||
super^script^
|
||||
sub,,script,,
|
||||
|
||||
For Markdown syntax these variations are used: >
|
||||
|
||||
**bold text** or __bold text__
|
||||
*italic text* or _italic text_
|
||||
***bold_italic text*** or ___italic_bold text___
|
||||
|
||||
Furthermore, there are a number of words which are highlighted extra flashy:
|
||||
TODO, DONE, STARTED, FIXME, FIXED, XXX.
|
||||
|
||||
|
@ -383,7 +383,7 @@ hi def link VimwikiBoldT VimwikiBold
|
||||
hi def VimwikiItalic term=italic cterm=italic gui=italic
|
||||
hi def link VimwikiItalicT VimwikiItalic
|
||||
|
||||
hi def VimwikiBoldItalic term=bold cterm=bold gui=bold,italic
|
||||
hi def VimwikiBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
|
||||
hi def link VimwikiItalicBold VimwikiBoldItalic
|
||||
hi def link VimwikiBoldItalicT VimwikiBoldItalic
|
||||
hi def link VimwikiItalicBoldT VimwikiBoldItalic
|
||||
|
@ -13,38 +13,36 @@ let s:markdown_syntax = g:vimwiki_syntax_variables['markdown']
|
||||
let s:markdown_syntax.rxEqIn = '\$[^$`]\+\$'
|
||||
let s:markdown_syntax.char_eqin = '\$'
|
||||
|
||||
" text: *strong*
|
||||
" let s:markdown_syntax.rxBold = '\*[^*]\+\*'
|
||||
" text: **strong** or __strong__
|
||||
let s:markdown_syntax.rxBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'\*'.
|
||||
\'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'.
|
||||
\'\*'.
|
||||
\'\(\*\|_\)\{2\}'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'\1\{2\}'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let s:markdown_syntax.char_bold = '*'
|
||||
let s:markdown_syntax.char_bold = '\*\*\|__'
|
||||
|
||||
" text: _emphasis_
|
||||
" let s:markdown_syntax.rxItalic = '_[^_]\+_'
|
||||
" text: _emphasis_ or *emphasis*
|
||||
let s:markdown_syntax.rxItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'_'.
|
||||
\'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'.
|
||||
\'_'.
|
||||
\'\(\*\|_\)'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'\1'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let s:markdown_syntax.char_italic = '_'
|
||||
let s:markdown_syntax.char_italic = '\*\|_'
|
||||
|
||||
" text: *_bold italic_* or _*italic bold*_
|
||||
let s:markdown_syntax.rxBoldItalic = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'\*_'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'_\*'.
|
||||
\'\(\*\)\{3\}'.
|
||||
\'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'.
|
||||
\'\1\{3\}'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let s:markdown_syntax.char_bolditalic = '\*_'
|
||||
let s:markdown_syntax.char_bolditalic = '\*\*\*'
|
||||
|
||||
let s:markdown_syntax.rxItalicBold = '\%(^\|\s\|[[:punct:]]\)\@<='.
|
||||
\'_\*'.
|
||||
\'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'.
|
||||
\'\*_'.
|
||||
\'\(_\)\{3\}'.
|
||||
\'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'.
|
||||
\'\1\{3\}'.
|
||||
\'\%([[:punct:]]\|\s\|$\)\@='
|
||||
let s:markdown_syntax.char_italicbold = '_\*'
|
||||
let s:markdown_syntax.char_italicbold = '___'
|
||||
|
||||
" text: `code`
|
||||
let s:markdown_syntax.rxCode = '`[^`]\+`'
|
||||
|
Loading…
Reference in New Issue
Block a user