Releases: deanhume/html-minifier
Release list
V2.1
🐛 Bug fixes
Preserve original file encoding (non-Unicode / Windows-1251) — #62
Files encoded in a non-Unicode codepage (e.g. Windows-1251 Cyrillic) were being read and rewritten as UTF-8, corrupting every non-ASCII character into � replacement characters. The minifier now detects the source encoding — via a byte-order mark, then a declaration, falling back to UTF-8 — and writes the file back in that same encoding, preserving any BOM. Encoding detection lives in the new EncodingHelper class.
Preserve significant whitespace between adjacent inline elements — #59
A space between two inline elements (for example, two links: ) is visible and meaningful, but was being stripped, gluing the elements together ( https://a.infohttps://b.de ). Whitespace directly between a closing inline tag and an opening inline tag ( a , span , b , i , em , strong , code , label , and other inline elements) is now collapsed to a single space instead of being removed. Whitespace at block↔inline boundaries is unchanged.
✅ Notes
• No breaking changes or new CLI flags.
• Full test suite green (83 tests), including new regression tests GithubIssue62_ShouldReturnCorrectly and GithubIssue59_ShouldReturnCorrectly .
V2.0
🐛 Bug Fixes
- Issue #47 — Fixed false-positive JS comment stripping: regex literals containing // (e.g. ///g) were incorrectly treated as line comments and removed
- Issue #30 — Fixed downlevel-revealed IE conditional comments being stripped: \n\n is now fully preserved
- Issue #38 — Fixed handling of edge cases in HTML structure
🛡️ Safety & Correctness
- textarea and code whitespace protection — content inside these tags is now preserved exactly, matching the existing pre tag behaviour
Attribute whitespace normalisation — excess whitespace inside attribute values (e.g. class=" foo bar ") is trimmed to single spaces
⚡ Performance & CLI
- Parallel file processing — multiple files/folders are now processed in parallel for significantly faster batch runs
- --version and --help flags — new CLI options for quick reference
- Improved console reporting — output now shows bytes saved per file and total savings across a run
🧪 Tests
- Added regression tests for issues #47, #30, #49 (Dictionary Razor model), textarea/code protection, attribute normalisation, edge cases, and performance benchmarks
- 81 tests passing
🌐 Other
- GitHub Pages marketing site added at docs/index.html
- Updated to Visual Studio 2022 build toolchain
- GitHub Actions CI/CD workflow added
v.1.9.3
This is version 1.9.3 of the HTML Minifier.
Updates
- The console window now displays the details of the files processed, as well as how much was saved during minification.
Full Changelog: v1.9.2...v1.9.3
v1.9.2
This is version 1.9.2 of the HTML Minifier.
Updates
- Added tests for accept tags in input type file as per this issue.
- Updated the tool folder with a 64 bit version of the exe. See this issue for more details.
Full Changelog: v1.9.1...v1.9.2
Version 1.9.1
This is version 1.9 of the HTML minifier.
Updates
- Updated to the latest .NET framework 4.7.2
- Updated with any missing changes
Version 1.9
This is version 1.9 of the HTML minifier.
Updates
Fixed encoding bug with UTF8 characters @MiroRadenovic 👍
Version 1.8
This is version 1.8 of the HTML minifier.
Updates
- Fixed an issue with file extensions
- Added feature switches to disable HTML minification & JS minification if necessary
- Nice refactoring thanks to @heldersepu 👍
Version 1.7
Version 1.6
Version 1.5
This is version 1.5 of the HTML minifier.
Updates
Updated version
Added code to remove JavaScript comments between script tags.