processing / processing/p5.js-web-editor
Tidy Code indent anomaly (parentheses)
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
Nature of issue?
- Found a bug
Details about the bug:
-
Web browser and version: Chrome 90.0.4430.212
-
Operating System: Windows 10
-
Steps to reproduce this bug:
- Running Tidy Code on the following block preserves the multi-line format of the first, but not the second "pg.line" statement.
- If the statements are reversed, the behavior is also reversed. (So maybe something to do with the brackets in "vv[v]"...?)
- Without the enclosing braces, both statements lose multi-line format, (not my preference in this instance, but at least it's consistent!)
{
pg.line(
0,
0,
0,
vv[v].normal.x * sc,
vv[v].normal.y * sc,
vv[v].normal.z * sc
);
pg.line(
0,
0,
0,
tt.normal.x * sc,
tt.normal.y * sc,
tt.normal.z * sc
);
}
Contributor guide
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 report in Tidy Code using the supplied JavaScript block in Chrome, then compare the formatting of the two pg.line statements when their order and enclosing braces change. Done means the formatter handles both statements consistently, with the intended multiline behavior documented by the issue.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100