Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Apply lua gumbo fixes #84

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ext/nokogumbo/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'mkmf'
$CFLAGS += " -std=c99"

CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
Copy link
Contributor

@craigbarnes craigbarnes Aug 22, 2018

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...?


if have_library('xml2', 'xmlNewDoc')
# libxml2 libraries from http://www.xmlsoft.org/
pkg_config('libxml-2.0')
Expand Down