Random comments preserved 🗫
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
**To Reproduce**
Minimal code to reproduce the bug
```js
'use strict'; // Zorf
console.log(/* Baz */ 'hi'); // Foo
/* Bar */
```
**Actual Output**
```js
"use strict";// Zorf
console.log(/* Baz */"hi");
```
**Expected Output**
```js
"use strict";console.log("hi");
```
**Additional context**
Started happening since 367cc048be5b16a78444dd17ab10f360a2479e48...ed5de0078b05cdbd2d5a45726288a0d2fdb14396. May be related to 3b1a8f057778e75e27ff2f64dc7fa9a407fea1a2.
Contributor guide
Research direction
Start with the minimal JavaScript reproduction in the issue and compare the actual output with the expected output. No source file or test is named, so trace comment handling through the minifier and inspect the referenced commits 367cc048be5b16a78444dd17ab10f360a2479e48...ed5de0078b05cdbd2d5a45726288a0d2fdb14396 and 3b1a8f057778e75e27ff2f64dc7fa9a407fea1a2. Done means the reproduced input produces the expected output without preserving the comments.
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
- 35/100