mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 23:10:11 -04:00
fix(html): fix wrong indents for script/style tags
This commit is contained in:
parent
28baed7698
commit
8c71c6c5ed
6 changed files with 91 additions and 2 deletions
4
tests/indent/html/issue-3986.html
Normal file
4
tests/indent/html/issue-3986.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
12
tests/indent/html/script_style.html
Normal file
12
tests/indent/html/script_style.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<head>
|
||||
<style>
|
||||
a {
|
||||
stroke-linecap: round;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
const foo = "bar"
|
||||
</script>
|
||||
</body>
|
||||
14
tests/indent/html/self_closing_tag.html
Normal file
14
tests/indent/html/self_closing_tag.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title></title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<br/>
|
||||
<button
|
||||
id = "123"
|
||||
</body>
|
||||
</html>
|
||||
8
tests/indent/html/start_tag.html
Normal file
8
tests/indent/html/start_tag.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<meta charset="UTF-8">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta
|
||||
charset="UTF-8"
|
||||
</head>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue