This repository has been archived by the owner on Aug 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Apply lua gumbo fixes #84
Merged
stevecheckoway
merged 166 commits into
rubys:master
from
stevecheckoway:apply-lua-gumbo-fixes
Aug 22, 2018
Merged
Changes from 1 commit
Commits
Show all changes
166 commits
Select commit
Hold shift + click to select a range
2857b91
Revert to gumbo-parser to aa91b27b02c0c80c482e24348a457ed7c3c088e0
stevecheckoway 488cbe2
Add newline to the end of "lib/tag_sizes.h" to fix a Clang error
craigbarnes 877a4fd
Replace gperf hash map with a linear lookup table
craigbarnes 51a5245
Update html5lib tree-construction tests
craigbarnes 0f2f866
Use gperf-generated perfect hash to implement gumbo_tagn_enum
craigbarnes f047714
Replace hackish "tag_strings.h" file with normal static array in "tag.c"
craigbarnes 4e2cb00
Replace locale-dependant ctype.h functions with custom equivalents
craigbarnes a47a620
Replace use of isspace() in parser.c with custom, ASCII-only equivalent
craigbarnes c99c311
Clean up char_ref.rl and regenerate char_ref.c
craigbarnes feab61d
Replace use of isalnum() with custom, ASCII-only equivalent
craigbarnes 31a1ea3
Add missing "static" qualifiers to hide symbols that shouldn't be extern
craigbarnes e4f3771
Rename consume_char_ref function to gumbo_consume_char_ref
craigbarnes e9268af
Coding style cleanups in lib/
craigbarnes 08174bd
More coding style cleanups in lib/
craigbarnes 21190a7
Remove copyright/license comments from header file
craigbarnes 7dc5281
Restore full license headers in lib/*.c files
craigbarnes 41dcdfc
Restore some "extern C" directives in header files
craigbarnes 548d923
Rename gumbo_tagset to TagSet
craigbarnes 6586398
Clean up duplicate TagSet definitions in lib/parser.c
craigbarnes aaa07a7
Add support for <dialog> tag
craigbarnes 6117840
Use ARRAY_COUNT macro in lib/parser.c to clean up some verbosity
craigbarnes d61211b
Restore full license headers in lib/char_ref.rl
craigbarnes 7cdea47
Minor coding style fixes in lib/error.h
craigbarnes a404bbf
Use designated initializers for global constants
craigbarnes 438fdfd
Convert 2 obscure for loops in lib/parser.c to equivalent while loops
craigbarnes 875b2ac
Style fixes in lib/parser.c
craigbarnes c6d344c
Fix duplicate TagSet initializer being ignored in is_special_node()
craigbarnes 0488527
Update some broken links to the HTML spec and use "https:" if available
craigbarnes 845505b
Replace linear array search in adjust_svg_attributes() with a gperf hash
craigbarnes 5b197d8
Regenerate lib/tag_lookup.c
craigbarnes bed7b13
Re-implement gumbo_normalize_svg_tagname() with a gperf hash
craigbarnes 8f2af43
Fix TAGSET_INCLUDES macro to work properly with multiple bit flags
craigbarnes 318ea37
Replace strcasecmp and strncasecmp with custom, ascii-only equivalents
craigbarnes ab8fadd
Move gumbo_ascii_tolower() to lib/util.h header and make static inline
craigbarnes 8b9479d
Fix an old style declaration and remove 2 unnecessary assertions
craigbarnes 738e9e2
Replace linear search in maybe_replace_codepoint() with a lookup table
craigbarnes aaf8aec
Minor coding style fixes in lib/tokenizer.c
craigbarnes 140b830
Minor coding style fixes
craigbarnes d4d04a9
More minor coding style fixes
craigbarnes 8f99b77
Compile lib and test objects with "-Wall -Wextra" and fix warnings
craigbarnes 175ad50
Use uint_fast32_t for loop_count variable in gumbo_parse_with_options
craigbarnes 7c8ccb3
Add build rules for generating source code documentation for libgumbo
craigbarnes 28df261
Clean up formatting of Doxygen comments in lib/gumbo.h
craigbarnes 01fb7fd
Minor style fixes in lib/utf8.c
craigbarnes 0757674
Use %ignore-case option in lib/tag_lookup.gperf
craigbarnes a3341e9
Coding style fixes in lib/parser.c
craigbarnes 4e32c4c
Minor style fixes in lib/char_ref.rl
craigbarnes ff28fba
Fix recording of source positions for form end tags
craigbarnes 5dead4d
WIN32 compat
squeek502 01e6e78
Remove obsolete strcasecmp aliases
squeek502 421b1f6
Add lib/README.md file describing libgumbo fork and changes
craigbarnes 00be6ef
Add links for commits mentioned in lib/README.md
craigbarnes ee18b39
Remove gumbo_string_copy() function
craigbarnes 2b16f2a
Remove custom allocator support from parser library
craigbarnes 92f8763
Remove Windows-specific header file
craigbarnes e7233da
Add some GCC/Clang function attributes
craigbarnes 561c000
Silence 2 unused variable warnings in char_ref.c when NDEBUG is set
craigbarnes 661b9f2
Coding style fixes in lib/parser.c
craigbarnes aa4dbd7
Deduplicate multiple TagSets containing the same heading tags
craigbarnes 86efb81
Fix broken links to the HTML spec in lib/parser.c
craigbarnes b060dec
Coding style fixes in lib/parser.c
craigbarnes 57c3c5d
More coding style fixes in lib/parser.c
craigbarnes 5146950
Replace long if statement in handle_in_template() function with a switch
craigbarnes db0300f
Deduplicate 4 identical TagSets in lib/parser.c
craigbarnes 00a5f52
Deduplicate 3 identical TagSets containing {TAG(DD), TAG(DT)}
craigbarnes 71c1142
Annotate print_message() function with PRINTF macro and fix warnings
craigbarnes d2af5d4
Annotate gumbo_debug() function with PRINTF macro and fix warnings
craigbarnes 22f53d2
Const-correctness fixes in lib/parser.c
craigbarnes 5289449
Add "-Wformat=2" to compiler flags and fix 1 warning
craigbarnes 1f09a3b
Move element nesting limit from Lua tree builder to parser
craigbarnes 77e7e88
Reduce tree depth limit from 512 to 400
craigbarnes 89293a7
Remove all unused GumboParser parameters from internal library API
craigbarnes 8542372
Fix benchmark runner
craigbarnes dc7cab4
Remove unused parameter from find_next_newline() function in lib/error.c
craigbarnes 11895a6
Silence unused parameter warning in gumbo_debug() function
craigbarnes a285732
Remove some more unused GumboParser parameters
craigbarnes 45cb3fe
Remove unused parameter from add_duplicate_attr_error() function
craigbarnes 2fe2f19
Enable "-Wunused-parameter" warning for lib/*.c and fix all warnings
craigbarnes c5a2dcd
Fix signedness of some format specifiers
craigbarnes 551787d
Make destroy_node() function non-recursive
craigbarnes 09e34d8
Add gumbo_realloc() function and use in maybe_resize_string_buffer()
craigbarnes f3cf7e0
Use gumbo_realloc() instead of gumbo_alloc() in enlarge_vector_if_full()
craigbarnes 166c190
Minor formatting fixes in code comments
craigbarnes 9a41667
Remove leftover references to (removed) custom allocators
craigbarnes 7895a83
Set _CRT_SECURE_NO_WARNINGS in CMakeLists.txt and remove from headers
craigbarnes 67348ca
Remove special handling for `<isindex>` tag
craigbarnes 2477e37
Remove special handling for <menuitem> tag
craigbarnes ec41cd0
Fix various broken/redirected links to the HTML spec
craigbarnes fc9a672
Fix a few more HTML spec links
craigbarnes 99314d8
Update some comments to reflect changes in the code
craigbarnes 70f1bf0
Simplify maybe_replace_codepoint() function
craigbarnes 7eca0f1
Pass TagSet arrays into functions by reference instead of value
craigbarnes 1c072f4
Coding style fixes in lib/parser.c
craigbarnes ef41514
Re-implement adjust_foreign_attributes() with a gperf hash
craigbarnes 3e7cd14
Reorder some functions in lib/parser.c to avoid forward declarations
craigbarnes 195e09e
Reorder some more functions to avoid forward declarations
craigbarnes c8ec286
Remove redundant, extra condition from consume_numeric_ref() function
craigbarnes 8745355
Update lib/README.md
craigbarnes c26b71b
Replace links to github.com with gitlab.com
craigbarnes f4fe66f
Clean up gperf-generated source files with a sed filter script
craigbarnes 371ea4b
Compile lib/foreign_attrs.c with "gperf -n"
craigbarnes 5fc19c6
Clean up compute_quirks_mode() function in lib/parser.c
craigbarnes 5d10ed4
Reformat code and comments in lib/utf8.c
craigbarnes 655876d
Remove old comments from lib/svg_attrs.gperf
craigbarnes 62d09d7
Remove "const" from TagSet typedef to avoid duplicate qualifier warnings
craigbarnes 6bd8338
Fix misuse of "int" type in lib/char_ref.rl
craigbarnes 07f8ac7
Use gperf "initializer-suffix" option to suppress missing field warnings
craigbarnes 154762e
Make gumbo_vector_init() argument type match GumboVector::capacity type
craigbarnes 4f5c652
Make type of GumboNode::index_within_parent match GumboVector::length
craigbarnes 0875f45
Change Utf8Iterator::_width from int to size_t
craigbarnes d7282e9
Use size_t instead of unsigned int for GumboSourcePosition fields
craigbarnes 57c61e0
Fix and clarify gumbo_caret_diagnostic_to_string()
craigbarnes 0843d74
Move ASCII util functions from lib/util.c to lib/ascii.c
craigbarnes 7c0bc37
Improve is_alpha() and ensure_lowercase() functions in lib/tokenizer.c
craigbarnes 7aa610e
Clean up formatting of dispatch_table[] in lib/tokenizer.c
craigbarnes 94a6c58
Minor style fixes in lib/ascii.h
craigbarnes 9bced91
Minor coding style fixes
craigbarnes d991f0d
Add XMALLOC macro
craigbarnes b9521bb
Rename gumbo_copy_stringz() to gumbo_strdup() and improve implementation
craigbarnes f4317f6
Rename "UNUSED" macro to "UNUSED_ARG"
craigbarnes b7f9a81
Delete nonsensical comment from lib/tag.c
craigbarnes e589ad1
Manually inline ascii_isspace() function into handle_in_table_text()
craigbarnes 0523457
Minor tweaks to handle_in_table_text() function
craigbarnes 14abccd
Optimize a few debug assertions
craigbarnes 5f76dba
Remove unnecessary call to strlen(3) from temporary_buffer_equals()
craigbarnes ace07d0
Reimplement fixes to the error reporting.
stevecheckoway 4e5f838
Use the improved gumbo API!
stevecheckoway 452dd53
Separate files for visual studio aren't needed
stevecheckoway 199c684
Import libgumbo test suite
craigbarnes f2670e6
Add support for <dialog> tag
craigbarnes 0e8bec3
Update some broken links to the HTML spec and use "https:" if available
craigbarnes b718ffd
Compile lib and test objects with "-Wall -Wextra" and fix warnings
craigbarnes 862a3ce
Use %ignore-case option in lib/tag_lookup.gperf
craigbarnes 40bc167
Add more test cases for previous commit
craigbarnes b10a9e9
Fix recording of source positions for form end tags
craigbarnes 412d191
Remove gumbo_string_copy() function
craigbarnes 1cd9a99
Remove all unused GumboParser parameters from internal library API
craigbarnes 555de09
Fix tokenizer test cases broken by the previous commit
craigbarnes e8d065f
Remove unused "parser.h" include from test/parser/utf8.cc
craigbarnes 2314e76
Minor formatting fixes in code comments
craigbarnes 39fd595
Remove special handling for `<isindex>` tag
craigbarnes 8c066f6
Fix various broken/redirected links to the HTML spec
craigbarnes 64a3a0a
Clean up test/parser/string_piece.cc
craigbarnes 5bd9c5e
Use updated error API.
stevecheckoway a631e3f
Remove some other cruft.
stevecheckoway 2ecdaba
Test gumbo.
stevecheckoway 2d026f3
Simplify.
stevecheckoway a8f4c39
Put on a single line.
stevecheckoway cedb8e1
Use the parsed text, not the original text with the <!CDATA[[ ]]> mar…
stevecheckoway 616601c
Fix element name handling for unknown elements
stevecheckoway 4f4e6f9
Use new, simpler API.
stevecheckoway 2b02701
Note where this needs improvement
stevecheckoway 3504fe0
Leave notes and a test about failures
stevecheckoway 0ba94e0
Fix self-closing error reporting
stevecheckoway 4b05e33
Add html5lib-tests to the test suite
stevecheckoway db4e01a
Fix before_script
stevecheckoway c4499d8
Very confusing; travis is just running rake now
stevecheckoway 9649222
Hopefully get rid of this terrible warning.
stevecheckoway 4aee777
Fix warnings.
stevecheckoway 1ec0673
Another int -> size_t
stevecheckoway d9fe66a
Try -Wall
stevecheckoway 84ff2f2
Use the upstream repo now that https://github.com/html5lib/html5lib-t…
stevecheckoway 66e2d8c
Remove Ruby 1.9; make verbose
stevecheckoway 3dc80ed
Remove &.
stevecheckoway 8813d24
Fix cdata construction without libxml2 headers
stevecheckoway a3f7adc
Allow setting attributes with colons
stevecheckoway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you get rid of this by compiling with-std=c99
?Edit: hmm, ignore that comment. The line above is literally
+= " -std=c99"
.I wonder why your compiler is warning for something that's explicitly allowed in C99 though...?