Commit Graph

39 Commits

Author SHA1 Message Date
Wilson Lin 138de76de9 Minify style attributes as well 2021-08-07 18:59:54 +10:00
Wilson Lin 4c0eb3ed28 Implement JS and CSS minification; add tests 2021-08-07 18:51:22 +10:00
Wilson Lin 6650d94485 Ignore html/head/body duplicate tags while parsing, omit them when minifying; parse <title> correctly 2021-08-07 15:59:41 +10:00
Wilson Lin 2885724931 Make Cfg values all default false 2021-08-07 14:56:20 +10:00
Wilson Lin 28944e33a4 Clippy suggestions 2021-08-06 23:18:45 +10:00
Wilson Lin b0c574dbd7 Fix tag omission minification; implement entity reencoding minification 2021-08-06 22:53:33 +10:00
Wilson Lin 5433c3041a Implement attr minification; various parser and minifier fixes 2021-08-06 21:56:54 +10:00
Wilson Lin 9eb5045f6f Sort attributes for determinism; fix parsing of entities; combine split adjacent text nodes 2021-08-06 21:04:47 +10:00
Wilson Lin 29d1b72230 Test attr minification 2021-08-06 20:36:58 +10:00
Wilson Lin bf37e37e71 Clean up dead code and tests 2021-08-06 17:54:23 +10:00
Wilson Lin 1a930a170d rustfmt 2021-08-06 16:19:36 +10:00
Wilson Lin 88d288b0cb Implement parser; remove legacy code 2021-08-06 12:07:27 +10:00
Wilson Lin 85b1c6658c Treat <textarea> as whitespace-sensitive 2021-05-23 11:54:30 +10:00
Wilson Lin 080d4e0c96 Relax parsing of unquoted attr values to accept own minified output 2021-04-21 00:55:39 +10:00
Wilson Lin 034932988e Follow spec on decoding entities in attr values 2021-04-16 12:19:47 +10:00
Wilson Lin 98cb36c9c2 Improve closing tag escaping 2021-04-15 01:36:06 +10:00
Wilson Lin feced339ea Escape unintentional script closing tag in JS 2021-04-15 00:18:16 +10:00
Wilson Lin df6426cb25 All gt must be encoded in unquoted attr values 2021-04-13 15:35:39 +10:00
Wilson Lin 261f3f6461 Add test 2021-02-07 01:55:52 +11:00
Wilson Lin 485db71ca6 Use written tag name for comparison 2021-02-07 01:46:46 +11:00
Wilson Lin 0bfb8d86d7 Fix pre propagation 2021-02-06 00:03:14 +11:00
Wilson Lin 55eab19bbe Do not minify any whitespace in any descendants of <pre> 2021-02-05 23:54:29 +11:00
Wilson Lin 83efa7e8a8 Add JS comment test 2021-01-26 21:25:08 +11:00
Wilson Lin e4d8b14d0b CSS minification using esbuild 2021-01-08 00:26:02 +11:00
Wilson Lin 9968dd4649 Add comment and a few more tests 2020-09-02 17:13:09 +10:00
Wilson Lin 9baa4c1a9e Allow < followed by invalid char to be content 2020-09-02 17:07:02 +10:00
Wilson Lin a415045ae6 Fix hex numeric entity parsing 2020-08-24 21:48:58 +10:00
Wilson Lin d7ddda3f21 Do not allow unmatched closing tag at root 2020-07-30 20:17:55 +10:00
Wilson Lin ed72690463 Allow omitted tags in source 2020-07-30 14:38:40 +10:00
Wilson Lin d2bffe8005 Allow case insensitive closing tag names for script and style 2020-07-30 12:46:18 +10:00
Wilson Lin abfc4bceaa Make tag and attribute names case insensitive 2020-07-30 12:32:53 +10:00
Wilson Lin 9627921cb2 Do not minify non-JS script data 2020-07-25 13:22:39 +10:00
Wilson Lin 9f40000527 Omit closing tags for html, head, body 2020-07-24 19:05:29 +10:00
Wilson Lin e9ea7bc378 Separate out and simplify debug repr; reimplement with_friendly_error; fix JS copying 2020-07-22 18:57:47 +10:00
Wilson Lin dc376d7c7f Rename to minify-html 2020-07-12 01:29:34 +10:00
Wilson Lin a15c0e76f9 Remove dependence on regex 2020-07-11 22:52:27 +10:00
Wilson Lin ced0e82515 Add support for configuration and JS minification using esbuild 2020-07-11 01:15:56 +10:00
Wilson Lin 0787bb83f1 Clean up dead code 2020-07-10 21:07:30 +10:00
Wilson Lin 9ffb7b1d98 Add unit tests and fix various bugs 2020-07-10 20:40:33 +10:00