diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 79499a6..1472265 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -175,12 +175,12 @@ syntax region texZone \ keepend \ transparent \ contains=texBeginEnd,@LUA -syntax region texZone - \ start='\\\(directlua\|luadirect\){'rs=s - \ end='}'re=e - \ keepend - \ transparent - \ contains=texBeginEnd,@LUA +syntax match texStatement '\\\(directlua\|luadirect\)' nextgroup=texZoneLua +syntax region texZoneLua matchgroup=Delimiter + \ start='{' + \ end='}' + \ contained + \ contains=@LUA let b:current_syntax = 'tex' " }}}1 diff --git a/test/features/syntax/test-syntax.tex b/test/features/syntax/test-syntax.tex index f1a8767..917e643 100644 --- a/test/features/syntax/test-syntax.tex +++ b/test/features/syntax/test-syntax.tex @@ -104,6 +104,18 @@ const double pi = 3.1415926535 \citeyearpar{} \bibentry{} +\directlua{ + if pdf.getminorversion() \string~= 7 then + print "pfd version 1.7" + end +} + +\begin{luacode} + if pdf.getminorversion() \string~= 7 then + print "pfd version 1.7" + end +\end{luacode} + \end{document} % vim: fdl=9