Update runtime files
diff --git a/runtime/indent/Makefile b/runtime/indent/Makefile
index d192605..f6c4473 100644
--- a/runtime/indent/Makefile
+++ b/runtime/indent/Makefile
@@ -10,5 +10,5 @@
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
-clean:
+clean testclean:
rm -f testdir/*.fail testdir/*.out
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index c99eb28..fdd743e 100644
--- a/runtime/indent/html.vim
+++ b/runtime/indent/html.vim
@@ -1,9 +1,8 @@
" Vim indent script for HTML
-" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
-" Last Change: 2020 Jun 18
-" Version: 1.0
+" Last Change: 2020 Jul 06
+" Version: 1.0 "{{{
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
" Supports template systems through hooks.
@@ -587,7 +586,7 @@
return eval(b:hi_js1indent)
endif
if b:hi_indent.scripttype == "javascript"
- return GetJavascriptIndent()
+ return eval(b:hi_js1indent) + GetJavascriptIndent()
else
return -1
endif
diff --git a/runtime/indent/testdir/html.in b/runtime/indent/testdir/html.in
index 80ce0cd..1acf8c0 100644
--- a/runtime/indent/testdir/html.in
+++ b/runtime/indent/testdir/html.in
@@ -2,6 +2,16 @@
" START_INDENT
+<html>
+ <body>
+<style>
+div#d1 { color: red; }
+div#d2 { color: green; }
+</style>
+ <script>
+ var v1 = "v1";
+var v2 = "v2";
+ </script>
<div>
<div>
text
@@ -32,5 +42,25 @@
</dt>
</dl>
+ </body>
+</html>
" END_INDENT
+
+% START_INDENT
+% INDENT_EXE let g:html_indent_style1 = "inc"
+% INDENT_EXE let g:html_indent_script1 = "zero"
+% INDENT_EXE call HtmlIndent_CheckUserSettings()
+<html>
+ <body>
+<style>
+div#d1 { color: red; }
+div#d2 { color: green; }
+</style>
+ <script>
+ var v1 = "v1";
+var v2 = "v2";
+ </script>
+</body>
+</html>
+% END_INDENT
diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok
index a96141f..ba2fd3f 100644
--- a/runtime/indent/testdir/html.ok
+++ b/runtime/indent/testdir/html.ok
@@ -2,35 +2,65 @@
" START_INDENT
-<div>
- <div>
- text
- </div>
-</div>
+<html>
+ <body>
+ <style>
+div#d1 { color: red; }
+div#d2 { color: green; }
+ </style>
+ <script>
+ var v1 = "v1";
+ var v2 = "v2";
+ </script>
+ <div>
+ <div>
+ text
+ </div>
+ </div>
-<div
- class="foo bar">
- text
-</div>
+ <div
+ class="foo bar">
+ text
+ </div>
-<div class="foo bar"
- data="something">
- text
-</div>
+ <div class="foo bar"
+ data="something">
+ text
+ </div>
-<div class="foo
- bar">
- text
-</div>
+ <div class="foo
+ bar">
+ text
+ </div>
-<dl>
- <dd>
- dd text
- </dd>
- <dt>
- dt text
- </dt>
-</dl>
+ <dl>
+ <dd>
+ dd text
+ </dd>
+ <dt>
+ dt text
+ </dt>
+ </dl>
+ </body>
+</html>
" END_INDENT
+
+% START_INDENT
+% INDENT_EXE let g:html_indent_style1 = "inc"
+% INDENT_EXE let g:html_indent_script1 = "zero"
+% INDENT_EXE call HtmlIndent_CheckUserSettings()
+<html>
+ <body>
+ <style>
+ div#d1 { color: red; }
+ div#d2 { color: green; }
+ </style>
+ <script>
+var v1 = "v1";
+var v2 = "v2";
+ </script>
+ </body>
+</html>
+% END_INDENT