Commit Graph

243 Commits

Author SHA1 Message Date
Wilson Lin 8553b09eb3 Fix handling of <script> and <style>; do not minify JS and CSS code 2020-01-10 00:12:21 +11:00
Wilson Lin 68c43ab486 Also bench hyperbuild Rust; improve graphs; remove default values for html-minifier config 2020-01-09 22:40:04 +11:00
Wilson Lin 1cb9bf9817 Improve closing tag minification; update bench results 2020-01-09 20:45:14 +11:00
Wilson Lin 8b4ec884b6 Handle ++/-- better 2020-01-09 00:57:14 +11:00
Wilson Lin ba4b3f09f3 Fix typo in error name 2020-01-09 00:49:17 +11:00
Wilson Lin 204bd950a4 Improve handling of JS 2020-01-09 00:42:03 +11:00
Wilson Lin 407acf01a6 Improve parsing attributes reliability 2020-01-09 00:34:59 +11:00
Wilson Lin a9eab38d88 Ensure JS RegExp does not contain line terminators 2020-01-09 00:34:35 +11:00
Wilson Lin da830939d7 Handle processing instructions 2020-01-08 23:00:23 +11:00
Wilson Lin 11adb24f00 Refactor JS parsing 2020-01-08 22:34:04 +11:00
Wilson Lin 3744e13a4d Attempt to handle RegExp literals in JS 2020-01-08 22:19:16 +11:00
Wilson Lin a9bb4c924f Minify JS/CSS comments; faster removal of boolean attr values; sorted generated JSON objects 2020-01-08 11:40:06 +11:00
Wilson Lin 9a9b543b26 Remove boolean attribute values 2020-01-08 00:38:42 +11:00
Wilson Lin e63f8734b4 More minification 2020-01-07 20:56:37 +11:00
Wilson Lin bab73243d7 Erase JS MIME types 2020-01-07 00:28:35 +11:00
Wilson Lin 3c90daa644 Implement closing tag omission 2020-01-06 23:36:05 +11:00
Wilson Lin 3ecfe2b41f Fix discarding significant characters 2020-01-06 19:53:46 +11:00
Wilson Lin 73545de0cb Improve build script 2020-01-06 18:54:46 +11:00
Wilson Lin 11017c7fcd Use general trie leaf node 2020-01-06 18:28:01 +11:00
Wilson Lin 886db3ea42 Fix entities decoding to longer sequence 2020-01-06 18:13:24 +11:00
Wilson Lin 058a6954e8 Build faster trie 2020-01-06 00:57:07 +11:00
Wilson Lin 5e05cbcff8 Improve Node.js install script 2020-01-05 13:55:20 +11:00
Wilson Lin 74e6352900 Use faster manual matching for content 2020-01-05 13:28:34 +11:00
Wilson Lin 9695d6a990 Fix empty attribute processing 2020-01-04 17:50:39 +11:00
Wilson Lin 94eec0d9af Fix whitespace text content and attribute value processing 2020-01-04 17:39:37 +11:00
Wilson Lin 89221927e2 Remove debug code 2020-01-03 17:46:43 +11:00
Wilson Lin 9764f27dda Fix attribute parsing 2020-01-03 17:16:51 +11:00
Wilson Lin 05b6c20861 Fix attribute processing 2020-01-03 16:57:32 +11:00
Wilson Lin 6939ec17a2 Improve pattern matching 2020-01-02 14:14:40 +11:00
Wilson Lin 506daa94a9 Fix CLI 2019-12-30 19:29:47 +11:00
Wilson Lin d967c429ab Create Node.js module 2019-12-30 18:16:33 +11:00
Wilson Lin aea733ba51 Remove comment 2019-12-30 16:54:08 +11:00
Wilson Lin 4570c647a9 Fix invalid entity decoding 2019-12-30 16:52:59 +11:00
Wilson Lin 9c77c7a1c1 Add documentation on API usage; hide unnecessary API exports 2019-12-30 11:52:45 +11:00
Wilson Lin 90fca89160 Update README; expect on debug only 2019-12-30 11:33:49 +11:00
Wilson Lin 7349b15ab8 Reformatting 2019-12-29 21:53:49 +11:00
Wilson Lin 126c719d23 Merge entity code; simplify build IO 2019-12-29 21:51:25 +11:00
Wilson Lin 7f56cff39e Remove date in comment 2019-12-29 21:42:03 +11:00
Wilson Lin 2149d20ae5 Generate patterns at compile time; update comment on entities; fix unused code 2019-12-29 21:39:29 +11:00
Wilson Lin 53904f1956 Build entities trie at compile time; support entities without semicolon 2019-12-29 21:00:20 +11:00
Wilson Lin 95be64d868 Fix entity decoding in attribute; create fuzzer project; simplify code 2019-12-28 23:06:04 +11:00
Wilson Lin 492eb64e4f Update README to describe whitespace minification; do not destroy whole whitespace in content-first elements 2019-12-28 17:15:23 +11:00
Wilson Lin 5f8da411b3 Clear out archive and unused tag names sets; update README with whitespace minification modes 2019-12-28 11:58:01 +11:00
Wilson Lin 1db8f4aa13 Enforce no whitespace between attribute name and value 2019-12-28 11:21:44 +11:00
Wilson Lin 530b7d7410 Fix writing UTF-8; update README 2019-12-28 11:16:28 +11:00
Wilson Lin 0b3e662d63 Update README; fix entity decoding in content 2019-12-27 22:32:04 +11:00
Wilson Lin a14def709f Update README; cleanup comments 2019-12-27 22:14:03 +11:00
Wilson Lin e15381c1cb Handle text script content 2019-12-27 21:52:49 +11:00
Wilson Lin a76c1f3cd5 Fix entity decoding in attribute value; enforce valid Unicode Scalar Value numeric entity refs; update named entities; error messages for CLI; support post-minification empty attributes 2019-12-27 00:23:33 +11:00
Wilson Lin 4ef7574487 Update README; clear old files; fix long lived ranges 2019-12-26 17:16:13 +11:00
Wilson Lin 4ddcb36e42 Faster non-sequence matching; improved attribute value minification 2019-12-26 16:17:57 +11:00
Wilson Lin da796a5839 Refactoring; fix whitespace minification in content 2019-12-26 13:47:18 +11:00
Wilson Lin 85a388d7c8 Develop basic CLI and get working 2019-12-25 23:29:18 +11:00
Wilson Lin 806560dd94 Complete initial migration to Rust 2019-12-25 20:44:51 +11:00
Wilson Lin d75d62883b Migrate mostly to Rust with significant optimisations and refactoring 2019-12-23 22:48:41 +11:00
Wilson Lin 2f24d2e618 Remove C infrastructure 2019-12-15 19:48:44 +11:00
Wilson Lin 1fb675ef91 Start migration to Rust 2019-12-15 19:37:53 +11:00
Wilson Lin 73ffe4ea88 Minor refactoring 2019-11-18 12:30:13 +11:00
Wilson Lin ba03841945 Complete refactoring; move CLI to separate project 2019-04-30 00:09:51 +10:00
Wilson Lin 104e55c778 Complete refactor of bang, comment, and attribute units 2019-04-22 17:03:21 +10:00
Wilson Lin 8b6e4c5c0b Don't decode entities in quoted attribute values if cfg says so 2019-04-22 17:02:57 +10:00
Wilson Lin e8fd813a2e Implement an accept function accepts if next character doesn't match some provided character
This makes it easy to do something like "accept until".
2019-04-22 17:01:35 +10:00
Wilson Lin d782d21108 Fix proc offset documentation and behaviour mismatch 2019-04-22 17:00:16 +10:00
Wilson Lin ba9e17b6bc Fix entity unit not writing complete entity if not decoding 2019-04-22 16:58:46 +10:00
Wilson Lin 4b4622b73f Update rules to use new nicehash; complete refactor of units attr, attr/unquoted, attr/quoted, entity, and tag/name; improve cfg usage 2019-04-21 02:40:25 +10:00
Wilson Lin e0bba6ac19 Complete restructuring of rule 2019-04-10 17:05:47 +10:00
Wilson Lin df4044d332 Refactor most of core, proc, and rule 2019-04-09 23:16:29 +10:00
Wilson Lin 39e0260f73 Begin restructuring 2019-03-18 22:46:04 +11:00
Wilson Lin 4b98c6a6b2 Incomplete major refactoring 2019-01-25 21:25:10 +13:00
Wilson Lin 277ea3303c Refactor out Emscripten version and restructure 2018-10-26 00:54:54 +13:00
Wilson Lin 7bdefd916a Don't do preprocessing anymore 2018-09-30 01:00:27 +12:00
Wilson Lin 21c4b75d4c Add hbu_pipe_skip_if 2018-09-30 00:59:53 +12:00
Wilson Lin c4b8c3128b Exit with 0 instead of EXIT_SUCCESS 2018-09-30 00:59:43 +12:00
Wilson Lin 198704d344 Add test for whitespace minification at root 2018-08-23 00:36:25 +12:00
Wilson Lin 52bcc4fde7 Handle errors gracefully by unwinding stack; implement Emscripten version 2018-08-22 03:02:14 +12:00
Wilson Lin a929268cc0 Add missing type info to pipe data in TS 2018-08-14 15:59:17 +12:00
Wilson Lin 69e2a66ee9 Pooling POC 2018-08-11 01:42:12 +12:00
Wilson Lin 10c49d152d Start directives stream 2018-08-10 22:02:35 +12:00
Wilson Lin 376afcd793 Fix entity stream refactoring 2018-08-10 22:01:27 +12:00
Wilson Lin 9ab8a0fafb Allow buffers as pipe inputs and give pipes an input_name 2018-08-10 22:00:53 +12:00
Wilson Lin 1df4fab239 Lazy-load and reuse default tags set options, and fix no value not being accepted as CLI tags list option values 2018-08-10 21:59:16 +12:00
Wilson Lin c16a77a568 Process entities in attribute values and ensure unquoted attribute values have at least one character 2018-08-09 15:48:34 +12:00
Wilson Lin 6fcdae711b Minify attribute value quotes 2018-08-08 16:58:54 +12:00
Wilson Lin a24f5a904e Implement pipe require_skip_predicate 2018-08-08 16:58:08 +12:00
Wilson Lin 6abb16ef18 Implement pipe output redirects 2018-08-08 16:57:55 +12:00
Wilson Lin 17896a20c4 Minify tag whitespace 2018-08-08 14:31:28 +12:00
Wilson Lin 6503cfa376 Fix removal of whitespace in specific attribute values 2018-08-08 13:39:43 +12:00
Wilson Lin 4f41c7d197 Fix parsing of tags 2018-08-08 13:39:32 +12:00
Wilson Lin 61649ea46a Clarify standard tags requirement in CLI tag list option arguments 2018-08-08 13:39:22 +12:00
Wilson Lin 7be3f6b09b Add more context to UNCLOSED_TAG error message 2018-08-08 13:38:50 +12:00
Wilson Lin d1f3476f4b Allow colons and hyphens in tag names 2018-08-08 13:38:32 +12:00
Wilson Lin e61ca93d21 Return acceptance count to while_predicate 2018-08-08 13:38:16 +12:00
Wilson Lin 59971c7319 Create case-insensitive matcher 2018-08-08 13:37:58 +12:00
Wilson Lin f0e5b5e66e Fix script tag comment parsing 2018-08-08 13:37:29 +12:00
Wilson Lin 48820d8377 Allow formatting in hbu_pipe_error 2018-08-08 13:37:06 +12:00
Wilson Lin b382fb9bd0 Clean up JS error messages 2018-08-08 11:09:37 +12:00
Wilson Lin 6db5e5c0a7 Make bare ampersands a separate error 2018-08-08 11:09:06 +12:00
Wilson Lin 6ca4363936 Fix double free error when expanding lists 2018-08-08 10:41:56 +12:00
Wilson Lin e2e12f408b More memory cleanup and safety 2018-08-08 10:41:39 +12:00
Wilson Lin 78b4ccf6a8 Detect memory allocation failures 2018-08-08 10:40:30 +12:00