Skip to content

Commit 5a7a4e5

Browse files
lukas-reinekekristijanhusak
authored andcommitted
bug: headline with four * trigger bold syntax
This causes a lot of weird behaviour, especially when `org_hide_emphasis_markers` is true. To fix it, change the `org_bold` syntax to not allow bold statements that start with two `*`
1 parent 917fbf9 commit 5a7a4e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/org.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let s:conceal = luaeval('require("orgmode.config").org_hide_emphasis_markers')
1111
if s:conceal
1212
let s:concealends = ' concealends'
1313
endif
14-
exe 'syntax region org_bold matchgroup=org_bold_delimiter start="\S\zs\*\|\*\S\@=" end="\S\zs\*\|\*\S\@=" keepend oneline contains=@Spell' . s:concealends
14+
exe 'syntax region org_bold matchgroup=org_bold_delimiter start="[^\*]\zs\*\|\*[^\*]\@=" end="\S\zs\*\|\*\S\@=" keepend oneline contains=@Spell' . s:concealends
1515
exe 'syntax region org_italic matchgroup=org_italic_delimiter start="\S\zs\/\|\/\S\@=" end="\S\zs\/\|\/\S\@=" keepend oneline contains=@Spell' . s:concealends
1616
exe 'syntax region org_underline matchgroup=org_underline_delimiter start="\S\zs_\|_\S\@=" end="\S\zs_\|_\S\@=" keepend oneline contains=@Spell' . s:concealends
1717
exe 'syntax region org_code matchgroup=org_code_delimiter start="\S\zs\~\|\~\S\@=" end="\S\zs\~\|\~\S\@=" keepend oneline contains=@Spell' . s:concealends

0 commit comments

Comments
 (0)