@@ -45,6 +45,26 @@ $output = $pm
45
45
46
46
For prettyprinting, call the ` indent() ` method instead of ` minify() ` .
47
47
48
+
49
+ The ` PrettyMin() ` constructor can be given an associative options array. Here are the possible option keys and their default values:
50
+ ```
51
+ 'minify_js' => true,
52
+ 'minify_css' => true,
53
+ 'remove_comments' => true,
54
+ 'remove_comments_exeptions' => ['/^\[if /'],
55
+ 'keep_whitespace_around' => [
56
+ // keep whitespace around all inline elements
57
+ 'b', 'big', 'i', 'small', 'tt',
58
+ 'abbr', 'acronym', 'cite', 'code', 'dfn', 'em', 'kbd', 'strong', 'samp', 'var',
59
+ 'a', 'bdo', 'br', 'img', 'map', 'object', 'q', 'span', 'sub', 'sup',
60
+ 'button', 'input', 'label', 'select', 'textarea'
61
+ ],
62
+ 'keep_whitespace_in' => ['script', 'style', 'pre'],
63
+ 'remove_empty_attributes' => ['style', 'class'],
64
+ 'indent_characters' => "\t"
65
+ ```
66
+
67
+
48
68
** Attention** : Because the formatting is done directly on the DOM tree, a DOMDocument object given to the ` load() ` method
49
69
will be modified:
50
70
0 commit comments