mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
refactor(vue, html): Update injections
Update html_tags injections so that html/vue/svelte parsers can use it without having a script/style tag being captured twice Signed-off-by: Pham Huy Hoang <hoangtun0810@gmail.com>
This commit is contained in:
parent
7951eb53f8
commit
6f4b9b190b
4 changed files with 126 additions and 63 deletions
45
tests/query/injections/html/test-html-injections.html
Normal file
45
tests/query/injections/html/test-html-injections.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<!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">
|
||||
<style>
|
||||
footer{
|
||||
/* ^ css
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
<style title="Test Style without type attribute">
|
||||
footer{
|
||||
/* ^ css
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
<style type="text/css" title="test style with defined type attribute">
|
||||
footer{
|
||||
/* ^ css
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
const x = 1
|
||||
// ^ javascript
|
||||
</script>
|
||||
<script defer>
|
||||
const x = 1
|
||||
// ^ javascript
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
const x = 1
|
||||
// ^ javascript
|
||||
</script>
|
||||
<div style="height: 100%">
|
||||
<!-- ^ css -->
|
||||
Test div to test css injections for style attributes
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue