Commit Graph

344 Commits

Author SHA1 Message Date
Wilson Lin 0985dafb14 Fix unrecognised suppressable error logging 2018-08-04 14:33:33 +12:00
Wilson Lin 4fdb1857f4 Better demonstrate contiguous whitespace 2018-08-04 00:54:37 +12:00
Wilson Lin f879e10607 Update README 2018-08-04 00:47:59 +12:00
Wilson Lin caf8dcac22 Stream entities 2018-08-04 00:15:44 +12:00
Wilson Lin d051650527 Various helper pipe write methods 2018-08-04 00:14:15 +12:00
Wilson Lin 01e805bf0d Return char on skip 2018-08-04 00:14:01 +12:00
Wilson Lin 30c322ab96 Add hex char rule 2018-08-04 00:13:44 +12:00
Wilson Lin abb47e0d15 Create lists with a specific initial size 2018-08-04 00:13:14 +12:00
Wilson Lin 90ad433c38 Fix parsing --supress 2018-08-04 00:12:34 +12:00
Wilson Lin dee2e03b21 Suppressable errors config 2018-08-03 23:02:10 +12:00
Wilson Lin cdad4f95e6 Missing include header 2018-08-03 23:01:17 +12:00
Wilson Lin a1513a88c1 Style parser 2018-08-03 23:01:07 +12:00
Wilson Lin a343241cfd Optimise script parser 2018-08-03 23:00:54 +12:00
Wilson Lin 8127690e89 Function to require from pipe but skip (don't output) 2018-08-03 22:57:56 +12:00
Wilson Lin 88017538f5 Add function to add Unicode code point to buffer 2018-08-03 22:57:30 +12:00
Wilson Lin 1eb19a4bc6 Remove redundant and incomplete tag categories table in README 2018-07-21 00:36:01 +12:00
Wilson Lin 7dc321b86a Allow self-closing tags 2018-07-20 22:40:05 +12:00
Wilson Lin 301bd36650 Parse JS code in script tags 2018-07-20 22:39:55 +12:00
Wilson Lin cbc837978d Parse comments 2018-07-20 22:39:37 +12:00
Wilson Lin 6080451453 Parse bangs 2018-07-20 22:39:28 +12:00
Wilson Lin 2c7992585a Buffer attr name when streaming 2018-07-20 22:37:15 +12:00
Wilson Lin a5a38c3a01 Fix missing hbchar.h include in streamoptions.c 2018-07-20 22:36:57 +12:00
Wilson Lin a0573b337d Buffer comparison to const char[] 2018-07-20 22:36:34 +12:00
Wilson Lin 9ca1294f26 Debug log when EOF 2018-07-20 22:36:20 +12:00
Wilson Lin 286547e209 Fix stalled parsing when `&` reached in text node 2018-07-20 22:36:06 +12:00
Wilson Lin aa76e9e415 Fix attrvalquote set existence checking 2018-07-20 22:35:38 +12:00
Wilson Lin 0270aaa61d Add position info to expected but not found errors 2018-07-20 22:35:25 +12:00
Wilson Lin 6a53d28f5e Fix prebuffering functionality for pipes 2018-07-20 22:34:53 +12:00
Wilson Lin 379a83a4a1 Add matching functionality to pipes 2018-07-20 22:34:38 +12:00
Wilson Lin 9d52db325c Add extra logging functions for pipes and debug logging level 2018-07-20 22:33:55 +12:00
Wilson Lin d7909c9c9e Add node_modules to gitignore 2018-07-20 22:31:27 +12:00
Wilson Lin 785b146e39 Add base tag 2018-07-13 22:54:40 +12:00
Wilson Lin 70f4fa1a4e Querying tags list arguments 2018-07-06 22:59:51 +12:00
Wilson Lin f53f0b367c Set up default values for tags list arguments 2018-07-06 22:59:39 +12:00
Wilson Lin d11e8d21b1 Add debug mode to compile script 2018-07-06 22:59:14 +12:00
Wilson Lin d44a22d47b Declare use of `*` in README 2018-07-06 22:59:01 +12:00
Wilson Lin 2f94043ddb Fix SEGV from no NULL check when parsing `*` as tags list argument values 2018-07-06 22:58:45 +12:00
Wilson Lin 445a7e1b68 Make `code` a specific tag (instead of a formatting tag) 2018-07-06 22:06:50 +12:00
Wilson Lin 8ac0ca57b3 Allow empty tags list arguments 2018-07-06 22:02:26 +12:00
Wilson Lin 79f0d0ea4e Set up tags list arguments in CLI 2018-07-06 21:51:22 +12:00
Wilson Lin ef518866a8 List of buffers structure 2018-07-06 21:50:37 +12:00
Wilson Lin 7b6c86116a Fix missing stdlib for malloc in util/list.h 2018-07-06 21:50:28 +12:00
Wilson Lin 18401bcf7d Basic math util functions 2018-07-06 21:49:54 +12:00
Wilson Lin 3c68a9c15b Generify buffer into list 2018-07-06 21:02:43 +12:00
Wilson Lin ebbc0d9193 Clarify mixing tags recommendation in README 2018-07-06 17:25:02 +12:00
Wilson Lin f4c95ca2ff Clarify minifier non-options in README 2018-07-06 17:24:43 +12:00
Wilson Lin 6a88eed4fc Fix internal link in README 2018-07-06 17:24:28 +12:00
Wilson Lin f880acae33 Create arguments for stream options 2018-07-06 17:05:41 +12:00
Wilson Lin a1108c5327 Stream options constructor and logger 2018-07-06 17:05:12 +12:00
Wilson Lin ce162224fc Check and fail when extra arguments provided via CLI 2018-07-06 17:04:51 +12:00
Wilson Lin b4d5ae92cb Enable toggling info logging 2018-07-06 17:04:13 +12:00
Wilson Lin a67257d740 Rename debug to info (logging) 2018-07-06 17:03:26 +12:00
Wilson Lin cd306005bb Helper key-value info logging 2018-07-06 17:01:50 +12:00
Wilson Lin 379bc32985 Shorten minifier CLI options 2018-07-06 17:00:45 +12:00
Wilson Lin fcf065f1db Rename hb_r_* to hbr_* for consistency 2018-07-06 16:11:02 +12:00
Wilson Lin 95d7404a2e Clarify conditional comments minification option 2018-07-06 16:07:34 +12:00
Wilson Lin 52d62dd7c8 Minifier options struct 2018-07-06 16:07:20 +12:00
Wilson Lin b77f3dd03b Mask output in pipe 2018-07-06 16:07:09 +12:00
Wilson Lin 34d2d828be Colourful printing 2018-07-06 15:19:03 +12:00
Wilson Lin 2538e24a17 Set up --buffer and --keep 2018-07-06 15:18:58 +12:00
Wilson Lin 20bd56c08e Fix duplicate <caption> whitelist parents rule 2018-07-06 13:48:12 +12:00
Wilson Lin 9037789510 Auto-delete output file on error 2018-07-06 13:47:54 +12:00
Wilson Lin cabf7c4e02 Warning logging 2018-07-06 13:47:35 +12:00
Wilson Lin 0631df5dd2 Allow tag rules to be reused 2018-07-06 11:41:55 +12:00
Wilson Lin 4c70adc3b5 Minor comment clarification 2018-07-06 11:41:23 +12:00
Wilson Lin a03db9a654 Update table of tag categories 2018-07-06 10:00:58 +12:00
Wilson Lin acb868ce25 Add missing tag rules initialisers to main rules init.c 2018-07-06 10:00:42 +12:00
Wilson Lin c922ae59c1 Add missing heading tags to content tags 2018-07-06 10:00:22 +12:00
Wilson Lin cf0d9cc066 `html`, `head`, `body` tags 2018-07-06 10:00:09 +12:00
Wilson Lin 0badaac1f1 Whitespace tags 2018-07-06 09:59:49 +12:00
Wilson Lin e7e5761249 Simplified content minification theory 2018-07-05 23:59:01 +12:00
Wilson Lin 5e9d67e3ef Clarify use of ampersands in directive entity argument values 2018-07-05 23:58:37 +12:00
Wilson Lin 7c9a64bc31 Tag omission notes 2018-07-05 23:58:12 +12:00
Wilson Lin ab284aa71e Complete tag relation rules 2018-07-05 23:58:05 +12:00
Wilson Lin 2856aa71c2 Update formatting tags 2018-07-05 23:57:48 +12:00
Wilson Lin 18cc08659a Specific tags 2018-07-05 23:57:36 +12:00
Wilson Lin 041cc5a73b Layout tags 2018-07-05 23:57:29 +12:00
Wilson Lin 7f5695bf02 Content-first tags 2018-07-05 23:57:16 +12:00
Wilson Lin cc3b047e36 Content tags 2018-07-05 23:57:07 +12:00
Wilson Lin 1328d8e0e5 Standard sectioning tags 2018-07-05 23:56:32 +12:00
Wilson Lin 8a966155f6 Standard media tags 2018-07-05 23:56:19 +12:00
Wilson Lin 34ceee4048 Standard heading tags 2018-07-05 23:55:56 +12:00
Wilson Lin b803b05751 Allow no input and output in CLI, and use debug logger 2018-07-05 21:21:07 +12:00
Wilson Lin df5e05b397 Add debug logger 2018-07-05 21:20:41 +12:00
Wilson Lin cb6930d9a8 Support stdin and stdout in file stream utils 2018-07-05 21:20:26 +12:00
Wilson Lin ff984c1551 Rearrange error codes to support exit codes 2018-07-05 21:18:41 +12:00
Wilson Lin 75ed1fe903 Fix error printing line terminator to stdout 2018-07-05 21:18:09 +12:00
Wilson Lin 2edf12fe34 Add new error codes to README 2018-07-05 21:17:31 +12:00
Wilson Lin 1c637e6a94 Fix missing loop in content stream 2018-07-05 20:56:49 +12:00
Wilson Lin 5fc5ec88d8 Fix buffer equality checker function 2018-07-05 20:56:33 +12:00
Wilson Lin ae806c9455 Error codes 2018-07-05 20:56:24 +12:00
Wilson Lin 9bdae51b01 Use streams in main.c 2018-07-05 19:55:11 +12:00
Wilson Lin e647872756 Basic tag streaming 2018-07-05 19:55:00 +12:00
Wilson Lin fefe796887 Attribute streaming 2018-07-05 19:54:30 +12:00
Wilson Lin 4a18fb3b5d Add predicates and conditional helper functions to pipe 2018-07-05 19:54:18 +12:00
Wilson Lin 978299ce46 Fix missing type casts in hbu_buffer_compare 2018-07-05 19:53:18 +12:00
Wilson Lin b56cbceb8b Remove redundant check in hbu_buffer_valid_index 2018-07-05 19:53:00 +12:00
Wilson Lin d68953cb26 Declare tag and content stream functions before defining as they depend on each other 2018-07-05 19:52:22 +12:00
Wilson Lin 26ddcc2cc6 Fix unquoted attribute rules (blacklist instead of whitelist) 2018-07-05 19:51:25 +12:00
Wilson Lin 4d5121a55d Attribute value quote rules 2018-07-05 19:50:51 +12:00