html-remove-empty-lines
is a Go-based CLI tool for removing empty lines from HTML files.
html-remove-empty-lines -file <file> -dir <directory> [-exts <extensions>] [-d]
-file <file>
: Specify the path to a single HTML file to process. Required if-dir
is not used.-dir <directory>
: Specify the path to a directory to process all HTML files recursively. Required if-file
is not used.-exts <extensions>
: Specify a comma-separated list of file extensions to process (e.g.,.html,.htm
). Defaults to.html
. Only applicable when using-dir
.-d
: Enable dry run mode. Displays changes without modifying the files.
- The
-file
and-dir
options are mutually exclusive; you must use one or the other. - The utility removes empty lines from HTML files while preserving content within
<pre></pre>
blocks.