diff options
| author | Jan-Jaap Korpershoek <jjkorpershoek96@gmail.com> | 2019-11-03 12:12:11 +0100 |
|---|---|---|
| committer | Jan-Jaap Korpershoek <jjkorpershoek96@gmail.com> | 2019-11-03 12:25:02 +0100 |
| commit | fcc8ed5df3de7f6ac8b56734ad09bcbb9207a48a (patch) | |
| tree | 2a92111a02ba2db0e80e28aad4f988ebba703d79 /test | |
| parent | ec31d839724cfd0f8431c04509f1f1d2b5fa1290 (diff) | |
[html] Fix indentation when entering a newline while in the middle of a tag
Example:
```
<tag>|</tag>
```
Then press enter
Old behaviour:
```
<tag>
</tag>
```
New behaviour:
```
<tag>
</tag>
```
I also added a test for it
Diffstat (limited to 'test')
| -rw-r--r-- | test/indent/html/indent-on-new-line/cmd | 1 | ||||
| -rw-r--r-- | test/indent/html/indent-on-new-line/in | 3 | ||||
| -rw-r--r-- | test/indent/html/indent-on-new-line/out | 4 | ||||
| -rw-r--r-- | test/indent/html/indent-on-new-line/rc | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/test/indent/html/indent-on-new-line/cmd b/test/indent/html/indent-on-new-line/cmd new file mode 100644 index 00000000..54aed4f8 --- /dev/null +++ b/test/indent/html/indent-on-new-line/cmd @@ -0,0 +1 @@ +i<ret><esc> diff --git a/test/indent/html/indent-on-new-line/in b/test/indent/html/indent-on-new-line/in new file mode 100644 index 00000000..45bc08e1 --- /dev/null +++ b/test/indent/html/indent-on-new-line/in @@ -0,0 +1,3 @@ +<div> + <div>%( )</div> +</div> diff --git a/test/indent/html/indent-on-new-line/out b/test/indent/html/indent-on-new-line/out new file mode 100644 index 00000000..914642e9 --- /dev/null +++ b/test/indent/html/indent-on-new-line/out @@ -0,0 +1,4 @@ +<div> + <div> + </div> +</div> diff --git a/test/indent/html/indent-on-new-line/rc b/test/indent/html/indent-on-new-line/rc new file mode 100644 index 00000000..ef3301f7 --- /dev/null +++ b/test/indent/html/indent-on-new-line/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/html.kak" +set buffer filetype html |
