Skip to content

Releases: deanhume/html-minifier

V2.1

Choose a tag to compare

@deanhume deanhume released this 27 Jul 10:25

🐛 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

Choose a tag to compare

@deanhume deanhume released this 23 Jun 13:33

🐛 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

Choose a tag to compare

@deanhume deanhume released this 09 Sep 15:49

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.
screenshot

Full Changelog: v1.9.2...v1.9.3

v1.9.2

Choose a tag to compare

@deanhume deanhume released this 24 Jul 14:47

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

Choose a tag to compare

@deanhume deanhume released this 16 Oct 15:52

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

Choose a tag to compare

@deanhume deanhume released this 24 Nov 14:14

This is version 1.9 of the HTML minifier.

Updates

Fixed encoding bug with UTF8 characters @MiroRadenovic 👍

Version 1.8

Choose a tag to compare

@deanhume deanhume released this 19 Apr 16:42

This is version 1.8 of the HTML minifier.

Updates

Version 1.7

Choose a tag to compare

@deanhume deanhume released this 16 Mar 09:24

This is version 1.7 of the HTML minifier.

Updates

Updated version
Merged in PR #20

Version 1.6

Choose a tag to compare

@deanhume deanhume released this 09 Mar 17:28

This is version 1.6 of the HTML minifier.

Updates

Updated version
Fixed an issue with multiple @usings & @inherits statements to move to a new line

Version 1.5

Choose a tag to compare

@deanhume deanhume released this 28 Jan 12:22

This is version 1.5 of the HTML minifier.

Updates

Updated version
Added code to remove JavaScript comments between script tags.