Fix issues with hyperlinks

This commit is contained in:
Alex Vear
2019-02-24 13:23:19 +00:00
parent 308e105630
commit 0fc590b293
2 changed files with 6 additions and 8 deletions

View File

@@ -10,4 +10,4 @@ Org-mode files.
- **TODO**: test with other colorthemes - **TODO**: test with other colorthemes
- **TODO**: fix italics - **TODO**: fix italics
- **TODO**: fix hyperlinks - **TODO**: fix spell checker

View File

@@ -49,13 +49,11 @@ syntax match orgTimestamp /<\d\{4}-\d\{2}-\d\{2}.\{-}>/ keepend
highlight def link orgTimestamp Operator highlight def link orgTimestamp Operator
" FIXME Hyperlinks " Hyperlinks
" - Highlight a link without formatting syntax match orgHyperlink /\[\{2}\([^][]\{-1,}\]\[\)\?[^][]\{-1,}\]\{2}/ containedin=ALL contains=orgHyperLeft,orgHyperRight,orgHyperURL
" - Fix issues with italics syntax match orgHyperLeft /\[\{2}/ contained conceal
syntax match orgHyperlink "\[\{2}[^][]*\(\]\[[^][]*\)\?\]\{2}" contains=orgHyperlinkBracketsLeft,orgHyperlinkURL,orgHyperlinkBracketsRight containedin=ALL syntax match orgHyperRight /\]\{2}/ contained conceal
syntax match orgHyperlinkBracketsLeft contained "\[\{2}#\?" conceal syntax match orgHyperURL /[^][]\{-1,}\]\[/ contained conceal
syntax match orgHyperlinkURL contained "[^][]*\]\[" conceal
syntax match orgHyperlinkBracketsRight contained "\]\{2}" conceal
highlight def link orgHyperlink Underlined highlight def link orgHyperlink Underlined