mblode / mblode/vscode-twig-language-2
Formatting in inline script tags does not keep indents
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
I have some problem with the formatting when I have an inline script tag.
When I have this in my file:
<div>
<script>
const myVar = "test;
if(myVar == 'test'){
console.log("hello");
}
</script>
</div>
I get this:
<div>
<script>
const myVar = "test;
if(myVar == 'test'){
console.log("hello");
}
</script>
</div>
So the script tags stay on the correct indentation. But everything between the tags loses all indentation.
Am I the only one?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported formatting behavior using the inline script example in the issue, then trace the extension's formatter entry point. Done means the script contents retain their indentation relative to the surrounding script tag while the tags themselves remain correctly indented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100