apache / apache/grails-intellij-plugin

Javascript code in tags <g:javascript> and <r:script> not reformating, if you use the substitution

Open
#121 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Reformating gsp-file: javascript code in tags <g:javascript> and <r:script> not reformating, if you use the substitution like ${varname}.
Only syntax highlight working.
In tag <script> - all ok

**before reformatting**
```

var a ="${a}";
for (b in c) {
b();
}

var a = "${a}";
for (b in c) {
b();
}

var a = "";
for (b in c) {
b();
}

var a = "";
for (b in c) {
b();
}

```
**after reformatting**
```

var a ="${a}";
for (b in c) {
b();
}

var a = "${a}";
for (b in c) {
b();
}

var a = "";
for (b in c) {
b();
}

var a = "";
for (b in c) {
b();
}

```

---

*Imported from [IDEA-101081](https://youtrack.jetbrains.com/issue/IDEA-101081) · Type: Bug · Votes: 1*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the formatting difference in a GSP file using the provided and examples, with and without ${varname} substitution. Trace the formatter entry point that handles these tags and make formatting match the existing behavior; done when both tag types indent and space the JavaScript consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.