makiri 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +11 -5
- data/CHANGELOG.md +65 -1
- data/ext/makiri/glue/glue.h +6 -0
- data/ext/makiri/glue/ruby_doc.c +56 -0
- data/ext/makiri/glue/ruby_mutate.c +37 -0
- data/ext/makiri/glue/ruby_node.c +197 -4
- data/ext/makiri/glue/ruby_xpath.c +1 -1
- data/lib/makiri/version.rb +1 -1
- metadata +1 -557
- data/vendor/lexbor/.github/FUNDING.yml +0 -12
- data/vendor/lexbor/.github/workflows/cmake.yml +0 -37
- data/vendor/lexbor/benchmarks/CMakeLists.txt +0 -22
- data/vendor/lexbor/benchmarks/benchmark.h +0 -101
- data/vendor/lexbor/benchmarks/lexbor/html/CMakeLists.txt +0 -16
- data/vendor/lexbor/benchmarks/lexbor/html/tokenizer/input_validation.c +0 -100
- data/vendor/lexbor/benchmarks/lexbor/html/tokenizer/parse.c +0 -95
- data/vendor/lexbor/benchmarks/lexbor/selectors/CMakeLists.txt +0 -16
- data/vendor/lexbor/benchmarks/lexbor/selectors/files/average.html +0 -41
- data/vendor/lexbor/benchmarks/lexbor/selectors/selectors.c +0 -144
- data/vendor/lexbor/examples/CMakeLists.txt +0 -17
- data/vendor/lexbor/examples/lexbor/css/CMakeLists.txt +0 -25
- data/vendor/lexbor/examples/lexbor/css/StyleSheet.c +0 -70
- data/vendor/lexbor/examples/lexbor/css/base.h +0 -34
- data/vendor/lexbor/examples/lexbor/css/selectors/list_easy_way.c +0 -74
- data/vendor/lexbor/examples/lexbor/css/selectors/list_fast_way.c +0 -149
- data/vendor/lexbor/examples/lexbor/css/syntax/structure_parse_file.c +0 -467
- data/vendor/lexbor/examples/lexbor/css/syntax/tokenizer/from_file.c +0 -87
- data/vendor/lexbor/examples/lexbor/css/syntax/tokenizer/print_raw.c +0 -100
- data/vendor/lexbor/examples/lexbor/encoding/CMakeLists.txt +0 -11
- data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/decode.c +0 -58
- data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/decoder.c +0 -140
- data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/validate.c +0 -65
- data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/encode.c +0 -67
- data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/encoder.c +0 -262
- data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/validate.c +0 -77
- data/vendor/lexbor/examples/lexbor/encoding/buffer/from_to.c +0 -193
- data/vendor/lexbor/examples/lexbor/encoding/data_by_name.c +0 -23
- data/vendor/lexbor/examples/lexbor/encoding/single/decode/decode.c +0 -55
- data/vendor/lexbor/examples/lexbor/encoding/single/decode/decoder.c +0 -115
- data/vendor/lexbor/examples/lexbor/encoding/single/decode/validate.c +0 -59
- data/vendor/lexbor/examples/lexbor/encoding/single/encode/encode.c +0 -65
- data/vendor/lexbor/examples/lexbor/encoding/single/encode/encoder.c +0 -241
- data/vendor/lexbor/examples/lexbor/encoding/single/encode/validate.c +0 -85
- data/vendor/lexbor/examples/lexbor/encoding/single/from_to.c +0 -156
- data/vendor/lexbor/examples/lexbor/html/CMakeLists.txt +0 -21
- data/vendor/lexbor/examples/lexbor/html/base.h +0 -98
- data/vendor/lexbor/examples/lexbor/html/document_parse.c +0 -43
- data/vendor/lexbor/examples/lexbor/html/document_parse_chunk.c +0 -72
- data/vendor/lexbor/examples/lexbor/html/document_title.c +0 -84
- data/vendor/lexbor/examples/lexbor/html/element_attributes.c +0 -134
- data/vendor/lexbor/examples/lexbor/html/element_create.c +0 -84
- data/vendor/lexbor/examples/lexbor/html/element_innerHTML.c +0 -52
- data/vendor/lexbor/examples/lexbor/html/elements_by_attr.c +0 -106
- data/vendor/lexbor/examples/lexbor/html/elements_by_class_name.c +0 -55
- data/vendor/lexbor/examples/lexbor/html/elements_by_tag_name.c +0 -51
- data/vendor/lexbor/examples/lexbor/html/encoding.c +0 -95
- data/vendor/lexbor/examples/lexbor/html/html2sexpr.c +0 -231
- data/vendor/lexbor/examples/lexbor/html/parse.c +0 -69
- data/vendor/lexbor/examples/lexbor/html/parse_chunk.c +0 -77
- data/vendor/lexbor/examples/lexbor/html/tokenizer/callback.c +0 -78
- data/vendor/lexbor/examples/lexbor/html/tokenizer/simple.c +0 -118
- data/vendor/lexbor/examples/lexbor/html/tokenizer/tag_attributes.c +0 -106
- data/vendor/lexbor/examples/lexbor/html/tokenizer/text.c +0 -75
- data/vendor/lexbor/examples/lexbor/punycode/CMakeLists.txt +0 -11
- data/vendor/lexbor/examples/lexbor/punycode/decode.c +0 -102
- data/vendor/lexbor/examples/lexbor/punycode/encode.c +0 -102
- data/vendor/lexbor/examples/lexbor/selectors/CMakeLists.txt +0 -15
- data/vendor/lexbor/examples/lexbor/selectors/easy_way.c +0 -120
- data/vendor/lexbor/examples/lexbor/selectors/normal_way.c +0 -172
- data/vendor/lexbor/examples/lexbor/selectors/unique_nodes.c +0 -142
- data/vendor/lexbor/examples/lexbor/styles/CMakeLists.txt +0 -15
- data/vendor/lexbor/examples/lexbor/styles/attribute_style.c +0 -110
- data/vendor/lexbor/examples/lexbor/styles/base.h +0 -34
- data/vendor/lexbor/examples/lexbor/styles/events_insert.c +0 -199
- data/vendor/lexbor/examples/lexbor/styles/stylesheet.c +0 -141
- data/vendor/lexbor/examples/lexbor/styles/walk.c +0 -170
- data/vendor/lexbor/examples/lexbor/unicode/CMakeLists.txt +0 -17
- data/vendor/lexbor/examples/lexbor/unicode/idna_to_ascii.c +0 -115
- data/vendor/lexbor/examples/lexbor/unicode/normalization_form.c +0 -99
- data/vendor/lexbor/examples/lexbor/unicode/normalization_form_stdin.c +0 -99
- data/vendor/lexbor/examples/lexbor/url/CMakeLists.txt +0 -15
- data/vendor/lexbor/examples/lexbor/url/parse.c +0 -101
- data/vendor/lexbor/examples/lexbor/url/relative.c +0 -112
- data/vendor/lexbor/images/SerpApi-logo.png +0 -0
- data/vendor/lexbor/images/neural-logo.png +0 -0
- data/vendor/lexbor/packaging/Makefile +0 -26
- data/vendor/lexbor/packaging/README.md +0 -17
- data/vendor/lexbor/packaging/deb/Makefile.in +0 -40
- data/vendor/lexbor/packaging/deb/Makefile.module.in +0 -15
- data/vendor/lexbor/packaging/deb/debian_in/changelog +0 -6
- data/vendor/lexbor/packaging/deb/debian_in/control +0 -25
- data/vendor/lexbor/packaging/deb/debian_in/copyright +0 -29
- data/vendor/lexbor/packaging/deb/debian_in/dev.dirs +0 -2
- data/vendor/lexbor/packaging/deb/debian_in/dev.install +0 -3
- data/vendor/lexbor/packaging/deb/debian_in/dirs +0 -1
- data/vendor/lexbor/packaging/deb/debian_in/docs +0 -2
- data/vendor/lexbor/packaging/deb/debian_in/install +0 -1
- data/vendor/lexbor/packaging/deb/debian_in/not-installed +0 -4
- data/vendor/lexbor/packaging/deb/debian_in/rules +0 -15
- data/vendor/lexbor/packaging/deb/debian_in/source/format +0 -1
- data/vendor/lexbor/packaging/deb/debian_main_in/changelog +0 -6
- data/vendor/lexbor/packaging/deb/debian_main_in/control +0 -33
- data/vendor/lexbor/packaging/deb/debian_main_in/copyright +0 -29
- data/vendor/lexbor/packaging/deb/debian_main_in/dev.dirs +0 -3
- data/vendor/lexbor/packaging/deb/debian_main_in/dev.install +0 -5
- data/vendor/lexbor/packaging/deb/debian_main_in/dirs +0 -1
- data/vendor/lexbor/packaging/deb/debian_main_in/docs +0 -2
- data/vendor/lexbor/packaging/deb/debian_main_in/install +0 -1
- data/vendor/lexbor/packaging/deb/debian_main_in/rules +0 -15
- data/vendor/lexbor/packaging/deb/debian_main_in/source/format +0 -1
- data/vendor/lexbor/packaging/rpm/Makefile +0 -14
- data/vendor/lexbor/packaging/rpm/build.sh +0 -105
- data/vendor/lexbor/packaging/rpm/liblexbor-module.spec.in +0 -31
- data/vendor/lexbor/packaging/rpm/liblexbor.spec.in +0 -62
- data/vendor/lexbor/test/CMakeLists.txt +0 -44
- data/vendor/lexbor/test/amalgamation/code/_base.h +0 -33
- data/vendor/lexbor/test/amalgamation/code/html.c +0 -35
- data/vendor/lexbor/test/amalgamation/generate_and_compile.sh +0 -130
- data/vendor/lexbor/test/external/commoncrawl.py +0 -110
- data/vendor/lexbor/test/files/lexbor/css/declarations/display.ton +0 -801
- data/vendor/lexbor/test/files/lexbor/css/declarations/height.ton +0 -367
- data/vendor/lexbor/test/files/lexbor/css/declarations/syntax.ton +0 -189
- data/vendor/lexbor/test/files/lexbor/css/declarations/width.ton +0 -367
- data/vendor/lexbor/test/files/lexbor/css/lexbor.css +0 -205
- data/vendor/lexbor/test/files/lexbor/css/syntax/parser/at.ton +0 -518
- data/vendor/lexbor/test/files/lexbor/css/syntax/parser/other.ton +0 -80
- data/vendor/lexbor/test/files/lexbor/css/syntax/parser/qualified.ton +0 -799
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/CDO-CDC.ton +0 -226
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/at.ton +0 -170
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/broken-utf-8.ton +0 -101
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/comment.ton +0 -95
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/hash.ton +0 -181
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/ident.ton +0 -245
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/number.ton +0 -694
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/other.ton +0 -16
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/reverse-solidus.ton +0 -111
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/single-tokens.ton +0 -66
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/string.ton +0 -303
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/unicode_range.ton +0 -139
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/url-function.ton +0 -229
- data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/whitespace.ton +0 -45
- data/vendor/lexbor/test/files/lexbor/encoding/big5_map_decode.txt +0 -14699
- data/vendor/lexbor/test/files/lexbor/encoding/euc_jp_map_decode.txt +0 -7737
- data/vendor/lexbor/test/files/lexbor/encoding/euc_kr_map_decode.txt +0 -17189
- data/vendor/lexbor/test/files/lexbor/encoding/gb18030_map_decode.txt +0 -27672
- data/vendor/lexbor/test/files/lexbor/encoding/iso_2022_jp_map_decode.txt +0 -7928
- data/vendor/lexbor/test/files/lexbor/encoding/shift_jis_map_decode.txt +0 -5138
- data/vendor/lexbor/test/files/lexbor/html/html5_test/README.md +0 -12
- data/vendor/lexbor/test/files/lexbor/html/html5_test/adoption01.ton +0 -442
- data/vendor/lexbor/test/files/lexbor/html/html5_test/adoption02.ton +0 -53
- data/vendor/lexbor/test/files/lexbor/html/html5_test/attributes.ton +0 -29
- data/vendor/lexbor/test/files/lexbor/html/html5_test/blocks.ton +0 -891
- data/vendor/lexbor/test/files/lexbor/html/html5_test/char_ref.ton +0 -51
- data/vendor/lexbor/test/files/lexbor/html/html5_test/comments01.ton +0 -290
- data/vendor/lexbor/test/files/lexbor/html/html5_test/doctype01.ton +0 -637
- data/vendor/lexbor/test/files/lexbor/html/html5_test/domjs-unsafe.ton +0 -822
- data/vendor/lexbor/test/files/lexbor/html/html5_test/entities01.ton +0 -1262
- data/vendor/lexbor/test/files/lexbor/html/html5_test/entities02.ton +0 -416
- data/vendor/lexbor/test/files/lexbor/html/html5_test/foreign-fragment.ton +0 -859
- data/vendor/lexbor/test/files/lexbor/html/html5_test/html5test-com.ton +0 -414
- data/vendor/lexbor/test/files/lexbor/html/html5_test/inbody01.ton +0 -78
- data/vendor/lexbor/test/files/lexbor/html/html5_test/isindex.ton +0 -67
- data/vendor/lexbor/test/files/lexbor/html/html5_test/main-element.ton +0 -63
- data/vendor/lexbor/test/files/lexbor/html/html5_test/math.ton +0 -140
- data/vendor/lexbor/test/files/lexbor/html/html5_test/menuitem-element.ton +0 -345
- data/vendor/lexbor/test/files/lexbor/html/html5_test/namespace-sensitivity.ton +0 -31
- data/vendor/lexbor/test/files/lexbor/html/html5_test/noscript01.ton +0 -344
- data/vendor/lexbor/test/files/lexbor/html/html5_test/pending-spec-changes-plain-text-unsafe.ton +0 -39
- data/vendor/lexbor/test/files/lexbor/html/html5_test/pending-spec-changes.ton +0 -65
- data/vendor/lexbor/test/files/lexbor/html/html5_test/plain-text-unsafe.ton +0 -657
- data/vendor/lexbor/test/files/lexbor/html/html5_test/quirks01.ton +0 -77
- data/vendor/lexbor/test/files/lexbor/html/html5_test/ruby.ton +0 -411
- data/vendor/lexbor/test/files/lexbor/html/html5_test/scriptdata01.ton +0 -499
- data/vendor/lexbor/test/files/lexbor/html/html5_test/search-element.ton +0 -63
- data/vendor/lexbor/test/files/lexbor/html/html5_test/svg.ton +0 -140
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tables01.ton +0 -421
- data/vendor/lexbor/test/files/lexbor/html/html5_test/template.ton +0 -2199
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests1.ton +0 -2486
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests10.ton +0 -1090
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests11.ton +0 -317
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests12.ton +0 -72
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests14.ton +0 -100
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests15.ton +0 -290
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests16.ton +0 -3471
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests17.ton +0 -244
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests18.ton +0 -752
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests19.ton +0 -1889
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests2.ton +0 -1093
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests20.ton +0 -1158
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests21.ton +0 -416
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests22.ton +0 -192
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests23.ton +0 -148
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests24.ton +0 -107
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests25.ton +0 -390
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests26.ton +0 -546
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests3.ton +0 -407
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests4.ton +0 -96
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests5.ton +0 -299
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests6.ton +0 -908
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests7.ton +0 -597
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests8.ton +0 -219
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests9.ton +0 -585
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tests_innerHTML_1.ton +0 -1164
- data/vendor/lexbor/test/files/lexbor/html/html5_test/tricky01.ton +0 -378
- data/vendor/lexbor/test/files/lexbor/html/html5_test/webkit01.ton +0 -1022
- data/vendor/lexbor/test/files/lexbor/html/html5_test/webkit02.ton +0 -996
- data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/README.md +0 -12
- data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/test-yahoo-jp.dat +0 -10
- data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/tests1.dat +0 -388
- data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/tests2.dat +0 -115
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/README.md +0 -12
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/contentModelFlags.test +0 -93
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/domjs.test +0 -335
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/entities.test +0 -542
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/escapeFlag.test +0 -36
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/namedEntities.test +0 -42422
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/numericEntities.test +0 -1677
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/pendingSpecChanges.test +0 -9
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test1.test +0 -353
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test2.test +0 -275
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test3.test +0 -11233
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test4.test +0 -532
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/unicodeChars.test +0 -1577
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/unicodeCharsProblematic.test +0 -41
- data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/xmlViolation.test +0 -20
- data/vendor/lexbor/test/files/lexbor/html/lexbor.html +0 -150
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/attributes.ton +0 -167
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/comment.ton +0 -218
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/document_type.ton +0 -180
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/element.ton +0 -392
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/processing_instruction.ton +0 -45
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/serialize_ext.ton +0 -277
- data/vendor/lexbor/test/files/lexbor/html/serialize_ext/text.ton +0 -308
- data/vendor/lexbor/test/files/lexbor/html/tokenizer/char_ref.ton +0 -563
- data/vendor/lexbor/test/files/lexbor/html/tokenizer/comment.ton +0 -28
- data/vendor/lexbor/test/files/lexbor/html/tokenizer/doctype.ton +0 -257
- data/vendor/lexbor/test/files/lexbor/html/tokenizer/tag_attr.ton +0 -107
- data/vendor/lexbor/test/files/lexbor/html/tokenizer/tag_name.ton +0 -51
- data/vendor/lexbor/test/files/lexbor/url/changes.ton +0 -1005
- data/vendor/lexbor/test/files/lexbor/url/domain.ton +0 -93
- data/vendor/lexbor/test/files/lexbor/url/file.ton +0 -29
- data/vendor/lexbor/test/files/lexbor/url/fragment.ton +0 -47
- data/vendor/lexbor/test/files/lexbor/url/ipv4.ton +0 -221
- data/vendor/lexbor/test/files/lexbor/url/ipv6.ton +0 -197
- data/vendor/lexbor/test/files/lexbor/url/path.ton +0 -510
- data/vendor/lexbor/test/files/lexbor/url/query.ton +0 -135
- data/vendor/lexbor/test/files/lexbor/url/scheme.ton +0 -139
- data/vendor/lexbor/test/files/lexbor/url/slow_path.ton +0 -460
- data/vendor/lexbor/test/files/lexbor/url/url.ton +0 -78
- data/vendor/lexbor/test/files/lexbor/url/username_password.ton +0 -127
- data/vendor/lexbor/test/fuzzers/lexbor/css/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/css/css.dict +0 -307
- data/vendor/lexbor/test/fuzzers/lexbor/css/stylesheet.c +0 -55
- data/vendor/lexbor/test/fuzzers/lexbor/css/syntax/syntax.dict +0 -41
- data/vendor/lexbor/test/fuzzers/lexbor/css/syntax/tokenizer.c +0 -99
- data/vendor/lexbor/test/fuzzers/lexbor/encoding/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/encoding/decode.c +0 -29
- data/vendor/lexbor/test/fuzzers/lexbor/html/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/html/document_parse.c +0 -23
- data/vendor/lexbor/test/fuzzers/lexbor/punycode/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/punycode/base.c +0 -89
- data/vendor/lexbor/test/fuzzers/lexbor/selectors/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/selectors/find.c +0 -146
- data/vendor/lexbor/test/fuzzers/lexbor/selectors/selectors.dict +0 -71
- data/vendor/lexbor/test/fuzzers/lexbor/unicode/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/unicode/idna_to_ascii.c +0 -40
- data/vendor/lexbor/test/fuzzers/lexbor/unicode/normalization_forms.c +0 -41
- data/vendor/lexbor/test/fuzzers/lexbor/url/CMakeLists.txt +0 -16
- data/vendor/lexbor/test/fuzzers/lexbor/url/modify.c +0 -117
- data/vendor/lexbor/test/fuzzers/lexbor/url/parser.c +0 -132
- data/vendor/lexbor/test/fuzzers/lexbor/url/url.dict +0 -13
- data/vendor/lexbor/test/lexbor/core/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/core/array.c +0 -443
- data/vendor/lexbor/test/lexbor/core/array_obj.c +0 -306
- data/vendor/lexbor/test/lexbor/core/avl.c +0 -1588
- data/vendor/lexbor/test/lexbor/core/bst.c +0 -388
- data/vendor/lexbor/test/lexbor/core/bst_map.c +0 -209
- data/vendor/lexbor/test/lexbor/core/dobject.c +0 -322
- data/vendor/lexbor/test/lexbor/core/hash.c +0 -171
- data/vendor/lexbor/test/lexbor/core/in.c +0 -356
- data/vendor/lexbor/test/lexbor/core/mem.c +0 -332
- data/vendor/lexbor/test/lexbor/core/mraw.c +0 -612
- data/vendor/lexbor/test/lexbor/core/str.c +0 -433
- data/vendor/lexbor/test/lexbor/css/CMakeLists.txt +0 -25
- data/vendor/lexbor/test/lexbor/css/declarations.c +0 -571
- data/vendor/lexbor/test/lexbor/css/selectors/selectors.c +0 -894
- data/vendor/lexbor/test/lexbor/css/selectors/specificity.c +0 -177
- data/vendor/lexbor/test/lexbor/css/stylesheet.c +0 -196
- data/vendor/lexbor/test/lexbor/css/syntax/an_plus_b.c +0 -233
- data/vendor/lexbor/test/lexbor/css/syntax/parser.c +0 -1134
- data/vendor/lexbor/test/lexbor/css/syntax/style.c +0 -67
- data/vendor/lexbor/test/lexbor/css/syntax/tokenizer.c +0 -485
- data/vendor/lexbor/test/lexbor/css/syntax/tokenizer_queue.c +0 -92
- data/vendor/lexbor/test/lexbor/dom/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/dom/exception.c +0 -210
- data/vendor/lexbor/test/lexbor/dom/node.c +0 -441
- data/vendor/lexbor/test/lexbor/encoding/CMakeLists.txt +0 -42
- data/vendor/lexbor/test/lexbor/encoding/buffer/big5.c +0 -210
- data/vendor/lexbor/test/lexbor/encoding/buffer/encoding.h +0 -243
- data/vendor/lexbor/test/lexbor/encoding/buffer/euc_jp.c +0 -228
- data/vendor/lexbor/test/lexbor/encoding/buffer/euc_kr.c +0 -172
- data/vendor/lexbor/test/lexbor/encoding/buffer/gb18030.c +0 -297
- data/vendor/lexbor/test/lexbor/encoding/buffer/ibm866.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_2022_jp.c +0 -403
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_10.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_13.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_14.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_15.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_16.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_2.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_3.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_4.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_5.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_6.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_7.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_8.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/koi8_r.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/koi8_u.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/macintosh.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/shift_jis.c +0 -230
- data/vendor/lexbor/test/lexbor/encoding/buffer/utf-16.c +0 -230
- data/vendor/lexbor/test/lexbor/encoding/buffer/utf-8.c +0 -282
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1250.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1251.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1252.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1253.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1254.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1255.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1256.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1257.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1258.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/windows_874.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/buffer/x_mac_cyrillic.c +0 -123
- data/vendor/lexbor/test/lexbor/encoding/encoding.c +0 -97
- data/vendor/lexbor/test/lexbor/encoding/parser.h +0 -225
- data/vendor/lexbor/test/lexbor/encoding/single/big5.c +0 -203
- data/vendor/lexbor/test/lexbor/encoding/single/encoding.h +0 -227
- data/vendor/lexbor/test/lexbor/encoding/single/euc_jp.c +0 -220
- data/vendor/lexbor/test/lexbor/encoding/single/euc_kr.c +0 -162
- data/vendor/lexbor/test/lexbor/encoding/single/gb18030.c +0 -277
- data/vendor/lexbor/test/lexbor/encoding/single/ibm866.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_2022_jp.c +0 -342
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_10.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_13.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_14.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_15.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_16.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_2.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_3.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_4.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_5.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_6.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_7.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_8.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/koi8_r.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/koi8_u.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/macintosh.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/shift_jis.c +0 -203
- data/vendor/lexbor/test/lexbor/encoding/single/utf-16.c +0 -216
- data/vendor/lexbor/test/lexbor/encoding/single/utf-8.c +0 -227
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1250.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1251.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1252.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1253.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1254.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1255.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1256.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1257.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_1258.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/windows_874.c +0 -114
- data/vendor/lexbor/test/lexbor/encoding/single/x_mac_cyrillic.c +0 -114
- data/vendor/lexbor/test/lexbor/html/CMakeLists.txt +0 -35
- data/vendor/lexbor/test/lexbor/html/attributes.c +0 -105
- data/vendor/lexbor/test/lexbor/html/build-cpp.cpp +0 -68
- data/vendor/lexbor/test/lexbor/html/clone.c +0 -356
- data/vendor/lexbor/test/lexbor/html/dom/document_type.c +0 -125
- data/vendor/lexbor/test/lexbor/html/element_by.c +0 -147
- data/vendor/lexbor/test/lexbor/html/encoding.c +0 -228
- data/vendor/lexbor/test/lexbor/html/encoding_html5lib_tests.c +0 -308
- data/vendor/lexbor/test/lexbor/html/encoding_prescan.c +0 -1686
- data/vendor/lexbor/test/lexbor/html/inner.c +0 -103
- data/vendor/lexbor/test/lexbor/html/other.c +0 -139
- data/vendor/lexbor/test/lexbor/html/parse.c +0 -380
- data/vendor/lexbor/test/lexbor/html/perf.c +0 -161
- data/vendor/lexbor/test/lexbor/html/serialize.c +0 -56
- data/vendor/lexbor/test/lexbor/html/serialize_ext.c +0 -461
- data/vendor/lexbor/test/lexbor/html/tags.c +0 -140
- data/vendor/lexbor/test/lexbor/html/tokenizer/errors.c +0 -34
- data/vendor/lexbor/test/lexbor/html/tokenizer/html5lib_tests.c +0 -1168
- data/vendor/lexbor/test/lexbor/html/tokenizer_helper.h +0 -403
- data/vendor/lexbor/test/lexbor/html/tokenizer_tokens.c +0 -754
- data/vendor/lexbor/test/lexbor/html/tree/errors.c +0 -34
- data/vendor/lexbor/test/lexbor/html/tree/open_elements.c +0 -99
- data/vendor/lexbor/test/lexbor/html/tree_builder.c +0 -536
- data/vendor/lexbor/test/lexbor/ns/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/ns/res.c +0 -55
- data/vendor/lexbor/test/lexbor/punycode/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/punycode/base.c +0 -240
- data/vendor/lexbor/test/lexbor/selectors/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/selectors/selectors.c +0 -911
- data/vendor/lexbor/test/lexbor/style/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/style/element_events.c +0 -291
- data/vendor/lexbor/test/lexbor/style/element_style_steps.c +0 -5035
- data/vendor/lexbor/test/lexbor/style/not_html_namespace.c +0 -87
- data/vendor/lexbor/test/lexbor/style/style_tag.c +0 -184
- data/vendor/lexbor/test/lexbor/style/stylesheet.c +0 -51
- data/vendor/lexbor/test/lexbor/style/wo_events.c +0 -351
- data/vendor/lexbor/test/lexbor/tag/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/tag/res.c +0 -440
- data/vendor/lexbor/test/lexbor/unicode/CMakeLists.txt +0 -17
- data/vendor/lexbor/test/lexbor/unicode/composition_test.c +0 -1095
- data/vendor/lexbor/test/lexbor/unicode/edges_normalization_forms.c +0 -220
- data/vendor/lexbor/test/lexbor/unicode/idna.c +0 -98
- data/vendor/lexbor/test/lexbor/unicode/idna_codepoints.c +0 -110
- data/vendor/lexbor/test/lexbor/unicode/idna_type.c +0 -31
- data/vendor/lexbor/test/lexbor/unicode/normalization_forms.c +0 -205
- data/vendor/lexbor/test/lexbor/unicode/normalization_forms_code_points.c +0 -214
- data/vendor/lexbor/test/lexbor/unicode/unicode_idna_test_res.h +0 -6423
- data/vendor/lexbor/test/lexbor/unicode/unicode_normalization_test_res.h +0 -120229
- data/vendor/lexbor/test/lexbor/url/CMakeLists.txt +0 -22
- data/vendor/lexbor/test/lexbor/url/errors.c +0 -41
- data/vendor/lexbor/test/lexbor/url/other.c +0 -134
- data/vendor/lexbor/test/lexbor/url/parser.c +0 -872
- data/vendor/lexbor/test/lexbor/url/search_params.c +0 -616
- data/vendor/lexbor/test/lexbor/url/validation.c +0 -185
- data/vendor/lexbor/test/unit/CMakeLists.txt +0 -49
- data/vendor/lexbor/test/unit/kv.c +0 -538
- data/vendor/lexbor/test/unit/kv.h +0 -301
- data/vendor/lexbor/test/unit/kv_rules.c +0 -609
- data/vendor/lexbor/test/unit/kv_state.c +0 -1470
- data/vendor/lexbor/test/unit/test.c +0 -131
- data/vendor/lexbor/test/unit/test.h +0 -410
- data/vendor/lexbor/utils/CMakeLists.txt +0 -11
- data/vendor/lexbor/utils/lexbor/css/grammar.txt +0 -263
- data/vendor/lexbor/utils/lexbor/css/names.py +0 -768
- data/vendor/lexbor/utils/lexbor/css/selectors/pseudo.py +0 -234
- data/vendor/lexbor/utils/lexbor/css/selectors/tmp/const.h +0 -21
- data/vendor/lexbor/utils/lexbor/css/selectors/tmp/res.h +0 -26
- data/vendor/lexbor/utils/lexbor/css/syntax/definitions.py +0 -62
- data/vendor/lexbor/utils/lexbor/css/syntax/non_ascii.pl +0 -77
- data/vendor/lexbor/utils/lexbor/css/syntax/token_res.py +0 -55
- data/vendor/lexbor/utils/lexbor/css/syntax/tokenizer_code_map.py +0 -36
- data/vendor/lexbor/utils/lexbor/css/tmp/const.h +0 -24
- data/vendor/lexbor/utils/lexbor/css/tmp/res.h +0 -26
- data/vendor/lexbor/utils/lexbor/css/tmp/types.h +0 -21
- data/vendor/lexbor/utils/lexbor/css/tmp/value_const.h +0 -21
- data/vendor/lexbor/utils/lexbor/css/tmp/value_res.h +0 -25
- data/vendor/lexbor/utils/lexbor/dom/attr.py +0 -129
- data/vendor/lexbor/utils/lexbor/dom/tmp/const.h +0 -23
- data/vendor/lexbor/utils/lexbor/dom/tmp/res.h +0 -27
- data/vendor/lexbor/utils/lexbor/encoding/CMakeLists.txt +0 -32
- data/vendor/lexbor/utils/lexbor/encoding/big5_map_decode.c +0 -93
- data/vendor/lexbor/utils/lexbor/encoding/buffer-single-byte.py +0 -95
- data/vendor/lexbor/utils/lexbor/encoding/encodings.json +0 -456
- data/vendor/lexbor/utils/lexbor/encoding/euc_jp_map_decode.c +0 -83
- data/vendor/lexbor/utils/lexbor/encoding/euc_kr_map_decode.c +0 -89
- data/vendor/lexbor/utils/lexbor/encoding/gb18030_map_decode.c +0 -170
- data/vendor/lexbor/utils/lexbor/encoding/iso_2022_jp_map_decode.c +0 -120
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-big5.txt +0 -18596
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-euc-kr.txt +0 -17054
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-gb18030.txt +0 -23946
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-iso-2022-jp-katakana.txt +0 -69
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-jis0208.txt +0 -7730
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-jis0212.txt +0 -6073
- data/vendor/lexbor/utils/lexbor/encoding/multi-byte.pl +0 -424
- data/vendor/lexbor/utils/lexbor/encoding/range-byte.py +0 -118
- data/vendor/lexbor/utils/lexbor/encoding/ranges/index-gb18030-ranges.txt +0 -213
- data/vendor/lexbor/utils/lexbor/encoding/res.py +0 -231
- data/vendor/lexbor/utils/lexbor/encoding/shift_jis_map_decode.c +0 -102
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-ibm866.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-10.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-13.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-14.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-15.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-16.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-2.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-3.txt +0 -127
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-4.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-5.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-6.txt +0 -89
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-7.txt +0 -131
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-8.txt +0 -98
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-koi8-r.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-koi8-u.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-macintosh.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1250.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1251.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1252.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1253.txt +0 -131
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1254.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1255.txt +0 -124
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1256.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1257.txt +0 -132
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1258.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-874.txt +0 -126
- data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-x-mac-cyrillic.txt +0 -134
- data/vendor/lexbor/utils/lexbor/encoding/single-byte.py +0 -179
- data/vendor/lexbor/utils/lexbor/encoding/tmp/buffer_single_byte_test.c +0 -123
- data/vendor/lexbor/utils/lexbor/encoding/tmp/const.h +0 -19
- data/vendor/lexbor/utils/lexbor/encoding/tmp/multi.c +0 -20
- data/vendor/lexbor/utils/lexbor/encoding/tmp/multi.h +0 -37
- data/vendor/lexbor/utils/lexbor/encoding/tmp/range.c +0 -17
- data/vendor/lexbor/utils/lexbor/encoding/tmp/range.h +0 -35
- data/vendor/lexbor/utils/lexbor/encoding/tmp/res.c +0 -22
- data/vendor/lexbor/utils/lexbor/encoding/tmp/res.h +0 -34
- data/vendor/lexbor/utils/lexbor/encoding/tmp/single.c +0 -20
- data/vendor/lexbor/utils/lexbor/encoding/tmp/single.h +0 -37
- data/vendor/lexbor/utils/lexbor/encoding/tmp/single_byte_test.c +0 -114
- data/vendor/lexbor/utils/lexbor/grammar/CMakeLists.txt +0 -63
- data/vendor/lexbor/utils/lexbor/grammar/base.h +0 -89
- data/vendor/lexbor/utils/lexbor/grammar/document.h +0 -34
- data/vendor/lexbor/utils/lexbor/grammar/grammar.c +0 -243
- data/vendor/lexbor/utils/lexbor/grammar/json.c +0 -368
- data/vendor/lexbor/utils/lexbor/grammar/json.h +0 -48
- data/vendor/lexbor/utils/lexbor/grammar/node.c +0 -653
- data/vendor/lexbor/utils/lexbor/grammar/node.h +0 -120
- data/vendor/lexbor/utils/lexbor/grammar/parser.c +0 -724
- data/vendor/lexbor/utils/lexbor/grammar/parser.h +0 -75
- data/vendor/lexbor/utils/lexbor/grammar/test.c +0 -1762
- data/vendor/lexbor/utils/lexbor/grammar/test.h +0 -35
- data/vendor/lexbor/utils/lexbor/grammar/token.c +0 -258
- data/vendor/lexbor/utils/lexbor/grammar/token.h +0 -91
- data/vendor/lexbor/utils/lexbor/grammar/tokenizer.c +0 -706
- data/vendor/lexbor/utils/lexbor/grammar/tokenizer.h +0 -73
- data/vendor/lexbor/utils/lexbor/html/convert_html5_tests.py +0 -162
- data/vendor/lexbor/utils/lexbor/html/data/entities.json +0 -2233
- data/vendor/lexbor/utils/lexbor/html/insertion_mode.py +0 -61
- data/vendor/lexbor/utils/lexbor/html/reorder_html5_tests_tokenizer_errors.py +0 -137
- data/vendor/lexbor/utils/lexbor/html/tmp/insertion_mode.c +0 -53
- data/vendor/lexbor/utils/lexbor/html/tmp/insertion_mode.h +0 -18
- data/vendor/lexbor/utils/lexbor/html/tmp/tokenizer_res.h +0 -20
- data/vendor/lexbor/utils/lexbor/html/tokenizer_entities_bst.py +0 -209
- data/vendor/lexbor/utils/lexbor/html/tokenizer_entities_switch.py +0 -162
- data/vendor/lexbor/utils/lexbor/html/tokenizer_parse_error.pl +0 -97
- data/vendor/lexbor/utils/lexbor/lexbor/LXB.py +0 -498
- data/vendor/lexbor/utils/lexbor/lexbor/res.py +0 -130
- data/vendor/lexbor/utils/lexbor/tag_ns/data/interfaces.json +0 -98
- data/vendor/lexbor/utils/lexbor/tag_ns/data/tags.json +0 -371
- data/vendor/lexbor/utils/lexbor/tag_ns/interfaces.py +0 -175
- data/vendor/lexbor/utils/lexbor/tag_ns/tags.py +0 -808
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_attribute_steps_res.h +0 -21
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_element_steps_res.h +0 -21
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_interface_res.h +0 -29
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_open_elements_res.h +0 -21
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_tag_res.h +0 -25
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/interface.c +0 -36
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/interface.h +0 -33
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/ns_const.h +0 -26
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/ns_res.h +0 -29
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/open_elements_res.h +0 -21
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/steps_res.h +0 -23
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/tag_const.h +0 -26
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/tag_res.h +0 -26
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/test/ns_res.c +0 -44
- data/vendor/lexbor/utils/lexbor/tag_ns/tmp/test/tag_res.c +0 -45
- data/vendor/lexbor/utils/lexbor/unicode/build.pl +0 -1323
- data/vendor/lexbor/utils/lexbor/unicode/idna_test.pl +0 -398
- data/vendor/lexbor/utils/lexbor/unicode/normalization_test.pl +0 -157
- data/vendor/lexbor/utils/wasm/gen_constants.py +0 -186
- data/vendor/lexbor/wasm/CMakeLists.txt +0 -18
- data/vendor/lexbor/wasm/lexbor/engine/CMakeLists.txt +0 -21
- data/vendor/lexbor/wasm/lexbor/engine/index.html +0 -406
- data/vendor/lexbor/wasm/lexbor/engine/lexbor.c +0 -1340
- data/vendor/lexbor/wasm/lexbor/html/CMakeLists.txt +0 -11
- data/vendor/lexbor/wasm/lexbor/html/parse.c +0 -58
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f88832bca79aadf7ea686b37739a5b600d9ff4a2075f28e9d59a885a66afab80
|
|
4
|
+
data.tar.gz: 6f835ef9f2bee6318e9ef5ff179dac48b7e99b2f019fb85f86c67eb94fced1e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4171815b57b086979c4638b44cd9316562e7293b16c40302a62e78b7a93c30f0a1e0dd4f09764574fe20c5b6e948699dee64dad6d45136e582da22b4ac5fc74d
|
|
7
|
+
data.tar.gz: ee5dda37c9dc8722d7313b96981312b0d1b1599dde764eeb108ba8397655586cfd793d6ce1a3f9473ae0cfc0e542d6e50f87c93dc355d9237432de00d088bb29
|
|
@@ -18,7 +18,7 @@ on:
|
|
|
18
18
|
workflow_dispatch:
|
|
19
19
|
inputs:
|
|
20
20
|
publish_to_rubygems:
|
|
21
|
-
description: "Push the built gems to RubyGems (
|
|
21
|
+
description: "Push the built gems to RubyGems (via Trusted Publishing / OIDC)"
|
|
22
22
|
type: boolean
|
|
23
23
|
default: false
|
|
24
24
|
|
|
@@ -197,12 +197,19 @@ jobs:
|
|
|
197
197
|
gh release upload "${GITHUB_REF_NAME}" dist/*.gem --repo "${GITHUB_REPOSITORY}" --clobber
|
|
198
198
|
|
|
199
199
|
# --- optional: publish to RubyGems (manual, opt-in, never on a tag push) ----
|
|
200
|
+
# Auth is RubyGems Trusted Publishing (OIDC): no stored API key, short-lived
|
|
201
|
+
# token, MFA-compatible. Configure a matching Trusted Publisher on RubyGems.org
|
|
202
|
+
# for this gem: owner=takahashim, repo=makiri, workflow=release.yml, and set its
|
|
203
|
+
# Environment to "rubygems" (matching `environment:` below).
|
|
200
204
|
publish:
|
|
201
205
|
name: Publish to RubyGems
|
|
202
206
|
needs: [source-gem, native-gem]
|
|
203
207
|
if: github.event_name == 'workflow_dispatch' && inputs.publish_to_rubygems
|
|
204
208
|
runs-on: ubuntu-latest
|
|
205
|
-
environment: rubygems # add a protection rule
|
|
209
|
+
environment: rubygems # add a Required-reviewers protection rule for an approval gate
|
|
210
|
+
permissions:
|
|
211
|
+
contents: read
|
|
212
|
+
id-token: write # OIDC identity token for Trusted Publishing
|
|
206
213
|
steps:
|
|
207
214
|
- uses: ruby/setup-ruby@v1
|
|
208
215
|
with:
|
|
@@ -212,11 +219,10 @@ jobs:
|
|
|
212
219
|
pattern: gem-*
|
|
213
220
|
merge-multiple: true
|
|
214
221
|
path: dist
|
|
222
|
+
- name: Configure RubyGems credentials (OIDC trusted publishing)
|
|
223
|
+
uses: rubygems/configure-rubygems-credentials@762a4b77c3300434bb57c7ce80b20e36231927aa # v2.0.0
|
|
215
224
|
- name: gem push
|
|
216
|
-
env:
|
|
217
|
-
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
|
218
225
|
run: |
|
|
219
|
-
test -n "$GEM_HOST_API_KEY" || { echo "RUBYGEMS_API_KEY secret is not set"; exit 1; }
|
|
220
226
|
for g in dist/*.gem; do
|
|
221
227
|
echo "Pushing $g"
|
|
222
228
|
gem push "$g"
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.0] - 2026-06-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
* `Element#tag_name` (DOM `tagName`) — the qualified name uppercased for an
|
|
15
|
+
HTML element in an HTML document (`"DIV"`), keeping the original case for
|
|
16
|
+
SVG/MathML; `nil` for non-elements. Complements `#name`, which stays the
|
|
17
|
+
lowercase qualified name.
|
|
18
|
+
* `ProcessingInstruction#target` (DOM `target`) — a PI's target name; `nil` for
|
|
19
|
+
other node kinds. Its data is read via `#content`/`#text`.
|
|
20
|
+
* `Document#create_processing_instruction(target, data)` (DOM
|
|
21
|
+
`createProcessingInstruction`) and `Document#create_document_fragment` (DOM
|
|
22
|
+
`createDocumentFragment`, an empty fragment to build up programmatically —
|
|
23
|
+
unlike `#fragment` / `DocumentFragment.parse`, which parse HTML). Both produce
|
|
24
|
+
a detached node owned by the document; PI creation fails closed when the data
|
|
25
|
+
contains the `?>` terminator (matching the DOM constraint). (DOM
|
|
26
|
+
`createCDATASection` is intentionally not provided: per WHATWG DOM it throws on
|
|
27
|
+
an HTML document, which is the only kind Makiri produces.)
|
|
28
|
+
* `Node#{namespace_uri, prefix, local_name}` — the WHATWG DOM per-node
|
|
29
|
+
namespace accessors on `Element` and `Attribute` (`nil` on other node kinds).
|
|
30
|
+
`namespace_uri` resolves an element's namespace from its node (so an HTML
|
|
31
|
+
element is the XHTML namespace `http://www.w3.org/1999/xhtml`, not `nil` — the
|
|
32
|
+
DOM-faithful value browsers and `namespace-uri()` return; SVG/MathML get their
|
|
33
|
+
own URI), and agrees byte-for-byte with the `namespace-uri()` XPath function.
|
|
34
|
+
For attributes it is `nil` unless prefixed, where it returns the parser-assigned
|
|
35
|
+
foreign-content namespace (`xlink`/`xml`/`xmlns`). `prefix` is the prefix
|
|
36
|
+
segment of the qualified name (`nil` for the usual unprefixed HTML5 case), and
|
|
37
|
+
`local_name` is the name without that prefix. Previously a node's namespace was
|
|
38
|
+
reachable only through XPath (`namespace-uri()`/`local-name()`).
|
|
39
|
+
* `Node#clone_node(deep = false)` — a copy of the node, owned by the same
|
|
40
|
+
document and detached from any parent (the DOM `cloneNode`, whose `deep`
|
|
41
|
+
defaults to `false` — a missing/`nil`/`false` argument is a shallow clone; a
|
|
42
|
+
truthy one copies the subtree). Built on the same `import_node` +
|
|
43
|
+
`<template>`-content fixup the fragment parser uses, so a deep-cloned
|
|
44
|
+
`<template>` keeps its contents. Fails closed: a failed import raises rather
|
|
45
|
+
than returning a partial node.
|
|
46
|
+
* `Document#import_node(node, deep = false)` — a copy of `node` owned by the
|
|
47
|
+
receiver document (the DOM `importNode`, whose `deep` likewise defaults to
|
|
48
|
+
`false`). Unlike `Node#clone_node`, the copy is owned by the target rather
|
|
49
|
+
than the node's own document, so it is the way to bring a node across
|
|
50
|
+
documents (Makiri never moves a node between arenas); the source is left
|
|
51
|
+
untouched. Same import + `<template>`-content fixup as `clone_node`, and fails
|
|
52
|
+
closed on a failed import.
|
|
53
|
+
* `Node#pointer_id` — the underlying `lxb_dom_node_t` pointer as an Integer,
|
|
54
|
+
matching `Nokogiri::XML::Node#pointer_id`. Shares the value `#hash`/`#eql?`
|
|
55
|
+
are built on, so it is a stable, Nokogiri-compatible identity key for
|
|
56
|
+
consumers (e.g. wrapper caches) that key nodes by pointer. Stable for a
|
|
57
|
+
node's lifetime; an address may be reused after a node is freed (same caveat
|
|
58
|
+
as Nokogiri).
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
* Source gem: drop the Lexbor trees the build never compiles
|
|
63
|
+
(`test`/`utils`/`examples`/`benchmarks`/`wasm`/`packaging`; each is behind an
|
|
64
|
+
`IF(LEXBOR_BUILD_*)` guard and we build with them OFF), roughly halving the
|
|
65
|
+
packaged file count (~1115 → ~566). Precompiled gems are unaffected.
|
|
66
|
+
|
|
67
|
+
### Internal
|
|
68
|
+
|
|
69
|
+
* XPath: build the per-context compiled-AST cache key with `mkr_strndup`
|
|
70
|
+
(the expression is a `verified_text`, so its length is known) instead of
|
|
71
|
+
`mkr_strdup`, avoiding a `strlen` over already-length-bounded bytes.
|
|
72
|
+
|
|
10
73
|
## [0.1.0] - 2026-06-02
|
|
11
74
|
|
|
12
75
|
First public release. An HTML5 parser, a native XPath 1.0 query engine, and CSS
|
|
@@ -98,5 +161,6 @@ libxml2 / libxslt dependency at any layer**.
|
|
|
98
161
|
domxpath, CSS differential vs `Nokogiri::HTML5`). GitHub Actions CI across
|
|
99
162
|
Ruby 3.2–4.0 × Ubuntu/macOS plus a sanitizer job.
|
|
100
163
|
|
|
101
|
-
[Unreleased]: https://github.com/takahashim/makiri/compare/v0.
|
|
164
|
+
[Unreleased]: https://github.com/takahashim/makiri/compare/v0.2.0...HEAD
|
|
165
|
+
[0.2.0]: https://github.com/takahashim/makiri/compare/v0.1.0...v0.2.0
|
|
102
166
|
[0.1.0]: https://github.com/takahashim/makiri/releases/tag/v0.1.0
|
data/ext/makiri/glue/glue.h
CHANGED
|
@@ -63,6 +63,12 @@ void mkr_import_fragment_children(lxb_dom_document_t *doc, lxb_dom_node_t *root,
|
|
|
63
63
|
void mkr_emit_append(lxb_dom_node_t *imported, void *u);
|
|
64
64
|
void mkr_emit_before(lxb_dom_node_t *imported, void *u);
|
|
65
65
|
|
|
66
|
+
/* Node#clone_node(deep=false): shallow/deep DOM clone owned by this node's
|
|
67
|
+
* document (import_node + <template>-content fixup), detached from any parent.
|
|
68
|
+
* Implemented in ruby_doc.c (next to the import machinery), bound in
|
|
69
|
+
* mkr_init_node. */
|
|
70
|
+
VALUE mkr_node_clone_node(int argc, VALUE *argv, VALUE self);
|
|
71
|
+
|
|
66
72
|
/* NodeSet bridge (glue/ruby_node_set.c). */
|
|
67
73
|
VALUE mkr_node_set_new(VALUE document);
|
|
68
74
|
void mkr_node_set_push(VALUE rb_set, lxb_dom_node_t *node);
|
data/ext/makiri/glue/ruby_doc.c
CHANGED
|
@@ -248,6 +248,61 @@ mkr_import_fragment_children(lxb_dom_document_t *doc, lxb_dom_node_t *root,
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
/* Node#clone_node(deep = false): a shallow (or deep, with deep truthy) copy of
|
|
252
|
+
* this node, owned by the same document and detached from any parent — the DOM
|
|
253
|
+
* cloneNode, whose `deep` defaults to false (a missing/nil/false argument =>
|
|
254
|
+
* shallow). Built on the same import_node + <template>-content fixup the
|
|
255
|
+
* fragment parser uses, so a deep-cloned <template> carries its contents (which
|
|
256
|
+
* import_node alone omits). Fails closed: a NULL import (e.g. OOM) raises rather
|
|
257
|
+
* than returning a partial node. */
|
|
258
|
+
VALUE
|
|
259
|
+
mkr_node_clone_node(int argc, VALUE *argv, VALUE self)
|
|
260
|
+
{
|
|
261
|
+
VALUE deep_v;
|
|
262
|
+
rb_scan_args(argc, argv, "01", &deep_v);
|
|
263
|
+
bool deep = RTEST(deep_v);
|
|
264
|
+
|
|
265
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
266
|
+
lxb_dom_document_t *doc = node->owner_document;
|
|
267
|
+
|
|
268
|
+
lxb_dom_node_t *clone = lxb_dom_document_import_node(doc, node, deep);
|
|
269
|
+
if (clone == NULL) {
|
|
270
|
+
rb_raise(mkr_eError, "failed to clone node");
|
|
271
|
+
}
|
|
272
|
+
if (deep) {
|
|
273
|
+
mkr_fixup_template_content(doc, node, clone);
|
|
274
|
+
}
|
|
275
|
+
return mkr_wrap_node(clone, mkr_node_document(self));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Document#import_node(node, deep = false): a shallow (or deep, with deep
|
|
279
|
+
* truthy) copy of +node+ owned by THIS document — the DOM importNode, whose
|
|
280
|
+
* `deep` defaults to false (a missing/nil/false argument => shallow). Unlike
|
|
281
|
+
* Node#clone_node, the copy is owned by the receiver rather than the node's own
|
|
282
|
+
* document, so it is the way to bring a node across documents (Makiri never
|
|
283
|
+
* moves a node between arenas). The source is left untouched; the copy is
|
|
284
|
+
* detached. Same import + <template>-content fixup as clone_node; fails closed
|
|
285
|
+
* on a NULL import. */
|
|
286
|
+
static VALUE
|
|
287
|
+
mkr_doc_import_node(int argc, VALUE *argv, VALUE self)
|
|
288
|
+
{
|
|
289
|
+
VALUE node_v, deep_v;
|
|
290
|
+
rb_scan_args(argc, argv, "11", &node_v, &deep_v);
|
|
291
|
+
bool deep = RTEST(deep_v);
|
|
292
|
+
|
|
293
|
+
lxb_dom_node_t *src = mkr_node_unwrap(node_v);
|
|
294
|
+
lxb_dom_document_t *doc = mkr_doc_unwrap(self);
|
|
295
|
+
|
|
296
|
+
lxb_dom_node_t *imp = lxb_dom_document_import_node(doc, src, deep);
|
|
297
|
+
if (imp == NULL) {
|
|
298
|
+
rb_raise(mkr_eError, "failed to import node");
|
|
299
|
+
}
|
|
300
|
+
if (deep) {
|
|
301
|
+
mkr_fixup_template_content(doc, src, imp);
|
|
302
|
+
}
|
|
303
|
+
return mkr_wrap_node(imp, self);
|
|
304
|
+
}
|
|
305
|
+
|
|
251
306
|
/* Parse +rb_html+ as a fragment in the given (tag id, namespace) context and
|
|
252
307
|
* build a DOCUMENT_FRAGMENT node owned by +document+ (so its nodes can be
|
|
253
308
|
* spliced into that document). Lexbor's by-tag-id fragment parser implements
|
|
@@ -482,6 +537,7 @@ mkr_init_document(void)
|
|
|
482
537
|
rb_define_method(mkr_cDocument, "internal_subset", mkr_doc_internal_subset, 0);
|
|
483
538
|
rb_define_method(mkr_cDocument, "quirks_mode", mkr_doc_quirks_mode, 0);
|
|
484
539
|
rb_define_method(mkr_cDocument, "fragment", mkr_doc_fragment, -1);
|
|
540
|
+
rb_define_method(mkr_cDocument, "import_node", mkr_doc_import_node, -1);
|
|
485
541
|
|
|
486
542
|
rb_define_singleton_method(mkr_cDocumentFragment, "parse", mkr_frag_s_parse, -1);
|
|
487
543
|
|
|
@@ -408,6 +408,39 @@ mkr_doc_create_comment(VALUE self, VALUE rb_text)
|
|
|
408
408
|
return mkr_wrap_node(lxb_dom_interface_node(c), self);
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
+
/* Document#create_processing_instruction(target, data) — DOM
|
|
412
|
+
* createProcessingInstruction: a detached ProcessingInstruction owned by this
|
|
413
|
+
* document. Lexbor validates the target, so an invalid one fails closed. */
|
|
414
|
+
static VALUE
|
|
415
|
+
mkr_doc_create_processing_instruction(VALUE self, VALUE rb_target, VALUE rb_data)
|
|
416
|
+
{
|
|
417
|
+
lxb_dom_document_t *doc = mkr_doc_unwrap(self);
|
|
418
|
+
mkr_ruby_borrowed_text_t tv = mkr_ruby_verified_text(rb_target, "processing instruction target");
|
|
419
|
+
mkr_ruby_borrowed_text_t dv = mkr_ruby_verified_text(rb_data, "processing instruction data");
|
|
420
|
+
lxb_dom_processing_instruction_t *pi = lxb_dom_document_create_processing_instruction(
|
|
421
|
+
doc, (const lxb_char_t *)tv.ptr, tv.len, (const lxb_char_t *)dv.ptr, dv.len);
|
|
422
|
+
RB_GC_GUARD(tv.value);
|
|
423
|
+
RB_GC_GUARD(dv.value);
|
|
424
|
+
if (pi == NULL) {
|
|
425
|
+
rb_raise(mkr_eError, "failed to create processing instruction");
|
|
426
|
+
}
|
|
427
|
+
return mkr_wrap_node(lxb_dom_interface_node(pi), self);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* Document#create_document_fragment — DOM createDocumentFragment: an empty
|
|
431
|
+
* DocumentFragment owned by this document (unlike #fragment / DocumentFragment.parse,
|
|
432
|
+
* which parse HTML; this makes an empty one to build up programmatically). */
|
|
433
|
+
static VALUE
|
|
434
|
+
mkr_doc_create_document_fragment(VALUE self)
|
|
435
|
+
{
|
|
436
|
+
lxb_dom_document_t *doc = mkr_doc_unwrap(self);
|
|
437
|
+
lxb_dom_document_fragment_t *f = lxb_dom_document_create_document_fragment(doc);
|
|
438
|
+
if (f == NULL) {
|
|
439
|
+
rb_raise(mkr_eError, "failed to create document fragment");
|
|
440
|
+
}
|
|
441
|
+
return mkr_wrap_node(lxb_dom_interface_node(f), self);
|
|
442
|
+
}
|
|
443
|
+
|
|
411
444
|
void
|
|
412
445
|
mkr_init_mutate(void)
|
|
413
446
|
{
|
|
@@ -433,4 +466,8 @@ mkr_init_mutate(void)
|
|
|
433
466
|
rb_define_method(mkr_cDocument, "create_element", mkr_doc_create_element, 1);
|
|
434
467
|
rb_define_method(mkr_cDocument, "create_text_node", mkr_doc_create_text_node, 1);
|
|
435
468
|
rb_define_method(mkr_cDocument, "create_comment", mkr_doc_create_comment, 1);
|
|
469
|
+
rb_define_method(mkr_cDocument, "create_processing_instruction",
|
|
470
|
+
mkr_doc_create_processing_instruction, 2);
|
|
471
|
+
rb_define_method(mkr_cDocument, "create_document_fragment",
|
|
472
|
+
mkr_doc_create_document_fragment, 0);
|
|
436
473
|
}
|
data/ext/makiri/glue/ruby_node.c
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#include "glue.h"
|
|
2
2
|
|
|
3
|
+
#include <lexbor/ns/ns.h> /* lxb_ns_by_id, LXB_NS__UNDEF (namespaceURI) */
|
|
4
|
+
|
|
3
5
|
/* ------------------------------------------------------------------ */
|
|
4
6
|
/* Node wrapper type */
|
|
5
7
|
/* ------------------------------------------------------------------ */
|
|
@@ -128,6 +130,179 @@ mkr_node_name(VALUE self)
|
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
|
|
133
|
+
/* ------------------------------------------------------------------ */
|
|
134
|
+
/* namespace (WHATWG DOM Element/Attr: namespaceURI/prefix/localName) */
|
|
135
|
+
/* ------------------------------------------------------------------ */
|
|
136
|
+
|
|
137
|
+
/*
|
|
138
|
+
* Local name (DOM `localName`): the name without any prefix — "div" for
|
|
139
|
+
* <div>, "path" for an SVG <path>, "href" for an xlink:href attribute.
|
|
140
|
+
* Defined on Element and Attribute only; nil for the other node kinds (the DOM
|
|
141
|
+
* gives a Text/Comment/Document no localName).
|
|
142
|
+
*/
|
|
143
|
+
static VALUE
|
|
144
|
+
mkr_node_local_name(VALUE self)
|
|
145
|
+
{
|
|
146
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
147
|
+
size_t len = 0;
|
|
148
|
+
const lxb_char_t *name;
|
|
149
|
+
|
|
150
|
+
switch (node->type) {
|
|
151
|
+
case LXB_DOM_NODE_TYPE_ELEMENT:
|
|
152
|
+
name = lxb_dom_element_local_name(lxb_dom_interface_element(node), &len);
|
|
153
|
+
break;
|
|
154
|
+
case LXB_DOM_NODE_TYPE_ATTRIBUTE:
|
|
155
|
+
name = lxb_dom_attr_local_name(lxb_dom_interface_attr(node), &len);
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
return Qnil;
|
|
159
|
+
}
|
|
160
|
+
return mkr_ruby_str_from_borrowed(mkr_borrowed_text((const char *)name, len));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
* Namespace prefix (DOM `prefix`): nil unless the qualified name is
|
|
165
|
+
* `prefix:local` — typically nil for HTML5-parsed content. Derived from the
|
|
166
|
+
* qualified-vs-local length (qualified == prefix ":" local), so a colon inside
|
|
167
|
+
* a local name can't be mistaken for a separator. Element/Attribute only.
|
|
168
|
+
*/
|
|
169
|
+
static VALUE
|
|
170
|
+
mkr_node_prefix(VALUE self)
|
|
171
|
+
{
|
|
172
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
173
|
+
const lxb_char_t *q = NULL;
|
|
174
|
+
size_t qlen = 0, llen = 0;
|
|
175
|
+
|
|
176
|
+
switch (node->type) {
|
|
177
|
+
case LXB_DOM_NODE_TYPE_ELEMENT: {
|
|
178
|
+
lxb_dom_element_t *el = lxb_dom_interface_element(node);
|
|
179
|
+
q = lxb_dom_element_qualified_name(el, &qlen);
|
|
180
|
+
(void) lxb_dom_element_local_name(el, &llen);
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case LXB_DOM_NODE_TYPE_ATTRIBUTE: {
|
|
184
|
+
lxb_dom_attr_t *at = lxb_dom_interface_attr(node);
|
|
185
|
+
q = lxb_dom_attr_qualified_name(at, &qlen);
|
|
186
|
+
(void) lxb_dom_attr_local_name(at, &llen);
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
default:
|
|
190
|
+
return Qnil;
|
|
191
|
+
}
|
|
192
|
+
if (q == NULL || qlen <= llen + 1) { /* no "prefix:" segment */
|
|
193
|
+
return Qnil;
|
|
194
|
+
}
|
|
195
|
+
return mkr_ruby_str_from_borrowed(
|
|
196
|
+
mkr_borrowed_text((const char *)q, qlen - llen - 1));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/*
|
|
200
|
+
* The fixed namespaces the HTML parser assigns to foreign-content attributes by
|
|
201
|
+
* prefix (the "adjust foreign attributes" step). Lexbor tags an attribute node
|
|
202
|
+
* with its *element's* ns rather than the attribute's own, so an attribute's
|
|
203
|
+
* namespaceURI is resolved from its prefix here, not from node->ns. Returns
|
|
204
|
+
* NULL (=> DOM null) for any other prefix.
|
|
205
|
+
*/
|
|
206
|
+
static const char *
|
|
207
|
+
mkr_attr_ns_for_prefix(const char *p, size_t n)
|
|
208
|
+
{
|
|
209
|
+
if (n == 5 && memcmp(p, "xlink", 5) == 0) return "http://www.w3.org/1999/xlink";
|
|
210
|
+
if (n == 3 && memcmp(p, "xml", 3) == 0) return "http://www.w3.org/XML/1998/namespace";
|
|
211
|
+
if (n == 5 && memcmp(p, "xmlns", 5) == 0) return "http://www.w3.org/2000/xmlns/";
|
|
212
|
+
return NULL;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/*
|
|
216
|
+
* Namespace URI (DOM `namespaceURI`).
|
|
217
|
+
*
|
|
218
|
+
* Element: resolved from node->ns, so — DOM-faithfully — an HTML element is in
|
|
219
|
+
* the XHTML namespace ("http://www.w3.org/1999/xhtml"), not nil (an HTML
|
|
220
|
+
* element is never namespaceless; this is what browsers' DOM and `namespace-uri()`
|
|
221
|
+
* return). SVG/MathML elements get their own URI; nil only when truly
|
|
222
|
+
* unnamespaced (LXB_NS__UNDEF).
|
|
223
|
+
*
|
|
224
|
+
* Attribute: nil for an unprefixed attribute (class, id, ...); for a prefixed
|
|
225
|
+
* one, the parser-assigned foreign-content namespace keyed on the prefix
|
|
226
|
+
* (xlink/xml/xmlns), else nil.
|
|
227
|
+
*
|
|
228
|
+
* Other node kinds: nil.
|
|
229
|
+
*/
|
|
230
|
+
static VALUE
|
|
231
|
+
mkr_node_namespace_uri(VALUE self)
|
|
232
|
+
{
|
|
233
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
234
|
+
|
|
235
|
+
if (node->type == LXB_DOM_NODE_TYPE_ELEMENT) {
|
|
236
|
+
if (node->ns == LXB_NS__UNDEF) {
|
|
237
|
+
return Qnil;
|
|
238
|
+
}
|
|
239
|
+
lxb_dom_document_t *doc = node->owner_document;
|
|
240
|
+
if (doc == NULL || doc->ns == NULL) {
|
|
241
|
+
return Qnil;
|
|
242
|
+
}
|
|
243
|
+
size_t len = 0;
|
|
244
|
+
const lxb_char_t *uri = lxb_ns_by_id(doc->ns, node->ns, &len);
|
|
245
|
+
if (uri == NULL || len == 0) {
|
|
246
|
+
return Qnil;
|
|
247
|
+
}
|
|
248
|
+
return mkr_ruby_str_from_borrowed(mkr_borrowed_text((const char *)uri, len));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (node->type == LXB_DOM_NODE_TYPE_ATTRIBUTE) {
|
|
252
|
+
lxb_dom_attr_t *at = lxb_dom_interface_attr(node);
|
|
253
|
+
size_t qlen = 0, llen = 0;
|
|
254
|
+
const lxb_char_t *q = lxb_dom_attr_qualified_name(at, &qlen);
|
|
255
|
+
(void) lxb_dom_attr_local_name(at, &llen);
|
|
256
|
+
if (q == NULL || qlen <= llen + 1) {
|
|
257
|
+
return Qnil; /* unprefixed attribute => no namespace */
|
|
258
|
+
}
|
|
259
|
+
const char *uri = mkr_attr_ns_for_prefix((const char *)q, qlen - llen - 1);
|
|
260
|
+
return uri ? rb_utf8_str_new_cstr(uri) : Qnil;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return Qnil;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* Element#tag_name (DOM `tagName`): the qualified name, uppercased for an HTML
|
|
268
|
+
* element in an HTML document ("DIV"), as the DOM specifies — unlike #name,
|
|
269
|
+
* which is the lowercase qualified name. SVG/MathML elements keep their case.
|
|
270
|
+
* nil for non-element nodes.
|
|
271
|
+
*/
|
|
272
|
+
static VALUE
|
|
273
|
+
mkr_node_tag_name(VALUE self)
|
|
274
|
+
{
|
|
275
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
276
|
+
if (node->type != LXB_DOM_NODE_TYPE_ELEMENT) {
|
|
277
|
+
return Qnil;
|
|
278
|
+
}
|
|
279
|
+
size_t len = 0;
|
|
280
|
+
const lxb_char_t *name =
|
|
281
|
+
lxb_dom_element_tag_name(lxb_dom_interface_element(node), &len);
|
|
282
|
+
if (name == NULL) {
|
|
283
|
+
return Qnil;
|
|
284
|
+
}
|
|
285
|
+
return mkr_ruby_str_from_borrowed(mkr_borrowed_text((const char *)name, len));
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/*
|
|
289
|
+
* ProcessingInstruction#target (DOM `target`): the PI's target name
|
|
290
|
+
* (the "xml" in <?xml ...?>). nil for non-PI nodes. The PI's data is read via
|
|
291
|
+
* #content / #text like any character-data node.
|
|
292
|
+
*/
|
|
293
|
+
static VALUE
|
|
294
|
+
mkr_node_pi_target(VALUE self)
|
|
295
|
+
{
|
|
296
|
+
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
297
|
+
if (node->type != LXB_DOM_NODE_TYPE_PROCESSING_INSTRUCTION) {
|
|
298
|
+
return Qnil;
|
|
299
|
+
}
|
|
300
|
+
size_t len = 0;
|
|
301
|
+
const lxb_char_t *t = lxb_dom_processing_instruction_target(
|
|
302
|
+
lxb_dom_interface_processing_instruction(node), &len);
|
|
303
|
+
return mkr_ruby_str_from_borrowed(mkr_borrowed_text((const char *)t, len));
|
|
304
|
+
}
|
|
305
|
+
|
|
131
306
|
/* Numeric DOM node type (LXB_DOM_NODE_TYPE_*). */
|
|
132
307
|
static VALUE
|
|
133
308
|
mkr_node_get_type(VALUE self)
|
|
@@ -549,19 +724,35 @@ mkr_node_equals(VALUE self, VALUE other)
|
|
|
549
724
|
return mkr_node_unwrap(self) == mkr_node_unwrap(other) ? Qtrue : Qfalse;
|
|
550
725
|
}
|
|
551
726
|
|
|
552
|
-
/*
|
|
553
|
-
*
|
|
727
|
+
/* Nokogiri-compatible identity: the underlying lxb_dom_node_t pointer as an
|
|
728
|
+
* Integer. Stable for the node's lifetime and unique among currently-live
|
|
729
|
+
* nodes; a freed-then-reallocated node may reuse an address (same caveat as
|
|
730
|
+
* Nokogiri::XML::Node#pointer_id). a.pointer_id == b.pointer_id iff a.eql?(b). */
|
|
554
731
|
static VALUE
|
|
555
|
-
|
|
732
|
+
mkr_node_pointer_id(VALUE self)
|
|
556
733
|
{
|
|
557
734
|
lxb_dom_node_t *node = mkr_node_unwrap(self);
|
|
558
735
|
return ULL2NUM((unsigned long long)(uintptr_t)node);
|
|
559
736
|
}
|
|
560
737
|
|
|
738
|
+
/* Stable hash derived from the node pointer, so a == b implies a.hash ==
|
|
739
|
+
* b.hash even across separately-created wrappers. Shares the pointer value
|
|
740
|
+
* with #pointer_id. */
|
|
741
|
+
static VALUE
|
|
742
|
+
mkr_node_hash(VALUE self)
|
|
743
|
+
{
|
|
744
|
+
return mkr_node_pointer_id(self);
|
|
745
|
+
}
|
|
746
|
+
|
|
561
747
|
void
|
|
562
748
|
mkr_init_node(void)
|
|
563
749
|
{
|
|
564
|
-
rb_define_method(mkr_cNode, "name",
|
|
750
|
+
rb_define_method(mkr_cNode, "name", mkr_node_name, 0);
|
|
751
|
+
rb_define_method(mkr_cNode, "namespace_uri", mkr_node_namespace_uri, 0);
|
|
752
|
+
rb_define_method(mkr_cNode, "prefix", mkr_node_prefix, 0);
|
|
753
|
+
rb_define_method(mkr_cNode, "local_name", mkr_node_local_name, 0);
|
|
754
|
+
rb_define_method(mkr_cNode, "tag_name", mkr_node_tag_name, 0);
|
|
755
|
+
rb_define_method(mkr_cNode, "target", mkr_node_pi_target, 0);
|
|
565
756
|
rb_define_method(mkr_cNode, "node_type", mkr_node_get_type, 0);
|
|
566
757
|
rb_define_method(mkr_cNode, "content", mkr_node_content, 0);
|
|
567
758
|
rb_define_method(mkr_cNode, "text", mkr_node_content, 0);
|
|
@@ -595,6 +786,8 @@ mkr_init_node(void)
|
|
|
595
786
|
rb_define_method(mkr_cNode, "==", mkr_node_equals, 1);
|
|
596
787
|
rb_define_method(mkr_cNode, "eql?", mkr_node_equals, 1);
|
|
597
788
|
rb_define_method(mkr_cNode, "hash", mkr_node_hash, 0);
|
|
789
|
+
rb_define_method(mkr_cNode, "pointer_id", mkr_node_pointer_id, 0);
|
|
790
|
+
rb_define_method(mkr_cNode, "clone_node", mkr_node_clone_node, -1);
|
|
598
791
|
|
|
599
792
|
/* DocumentType identifiers (WHATWG DOM names; external_id is the
|
|
600
793
|
* Nokogiri-compatible alias for public_id). */
|
|
@@ -540,7 +540,7 @@ mkr_ctx_cached_ast(mkr_xpath_ctx_data_t *d, mkr_verified_text_t expr,
|
|
|
540
540
|
*owned = 1;
|
|
541
541
|
return ast;
|
|
542
542
|
}
|
|
543
|
-
char *key =
|
|
543
|
+
char *key = mkr_strndup(expr.ptr, expr.len); /* expr is verified_text: len known, no strlen */
|
|
544
544
|
if (key == NULL) {
|
|
545
545
|
*owned = 1;
|
|
546
546
|
return ast;
|
data/lib/makiri/version.rb
CHANGED