Hello, world!
", cfg); ``` minify-html is also available for TypeScript: ```ts import * as minifyHtml from "@minify-html/js"; import * as fs from "fs"; const cfg = minifyHtml.createConfiguration({ keep_spaces_between_attributes: true, keep_comments: true }); const minified = minifyHtml.minify("Hello, world!
", cfg); ```Hello, world!
", cfg); ```Hello, world!
", minify_js=True, remove_processing_instructions=True) ```Hello, world!
", { :keep_spaces_between_attributes => true, :minify_js => true }) ```Before | After |
---|---|
```html
↵ ··The·quick·brown·fox↵ ··jumps·over·the·lazy↵ ··dog.↵ ``` |
```html
·The·quick·brown·fox·jumps·over·the·lazy·dog.· ``` |
Before | After |
---|---|
```html
|
```html
|
Before | After |
---|---|
```html
↵ ··Hey,·I·just·found↵ ··out·about·this·cool·website!↵ ··[1]↵ ``` |
```html
Hey,·I·just·found↵ ··out·about·this·cool·website!↵ ··[1] ``` |
↵ ··Hey,·I·just·found↵ ··out·about·this·cool·website!↵ ··[1]↵
``` ###### After ```htmlHey,·I·just·found·out·about·this·cool·website!·[1]
```