kangax / kangax/html-minifier

collapseWhitespace remove the space around the <output> tag

Open
#1,070 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
577
PR merge metrics
No merged PRs in 30d

Description

**how to reproduce:**

1. create example html file "input.html":
```html

Before output tag text 23 after output tag text.

Before b tag text 23 after b tag text.


```

2. run with collapseWhitespace parameter
```npx html-minifier --collapse-whitespace input.html -o output.html```

**html result "output.html":**
```html

Before output tag text23after output tag text.

Before b tag text 23 after b tag text.


```

**reason: the "output" is not a inline tag, but is often used as a inline (for javascript).**

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with input.html and the npx html-minifier --collapse-whitespace command, comparing the output.html result for output and b tags. Start by tracing the collapseWhitespace handling of the output tag. Done means spaces around the output element are preserved as shown in the input while whitespace is still collapsed elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.