File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ function! htl_syntax#amend(options)
7
7
let s: current_syntax= b: current_syntax
8
8
unlet b: current_syntax
9
9
endif
10
+ let g: main_syntax = ' java'
10
11
syn include @HTMLSyntax syntax/html.vim
12
+ unlet g: main_syntax
13
+ " we let/unlet g:main_syntax as a hack to prevent syntax/html.vim from
14
+ " re-sourcing syntax/javascript.vim
11
15
if exists (' s:current_syntax' )
12
16
let b: current_syntax= s: current_syntax
13
17
endif
@@ -23,13 +27,6 @@ function! htl_syntax#amend(options)
23
27
endif
24
28
endif
25
29
26
- if (&filetype == # ' javascript.jsx' )
27
- " sourcing html syntax will re-source javascript syntax because html has
28
- " <script> tags. However, re-sourcing javascript will erase jsx
29
- " modifications, so we need to additionally re-source jsx syntax.
30
- runtime syntax /jsx.vim
31
- endif
32
-
33
30
exec 'syntax region litHtmlRegion
34
31
\ contains= @H TMLSyntax,' . (a:options.typescript ? ' typescriptInterpolation,typescriptTemplateSubstitution' : ' jsTemplateExpression' ) . '
35
32
\ containedin= typescriptBlock
You can’t perform that action at this time.
0 commit comments