nokogiri 1.10.10-x86-mingw32 → 1.11.0.rc1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +19 -17
- data/ext/nokogiri/extconf.rb +44 -35
- data/ext/nokogiri/nokogiri.c +12 -6
- data/ext/nokogiri/nokogiri.h +1 -0
- data/ext/nokogiri/xml_document.c +10 -1
- data/ext/nokogiri/xml_node.c +20 -0
- data/ext/nokogiri/xml_schema.c +0 -29
- data/ext/nokogiri/xslt_stylesheet.c +0 -4
- data/lib/nokogiri.rb +2 -19
- data/lib/nokogiri/2.4/nokogiri.so +0 -0
- data/lib/nokogiri/2.5/nokogiri.so +0 -0
- data/lib/nokogiri/2.6/nokogiri.so +0 -0
- data/lib/nokogiri/2.7/nokogiri.so +0 -0
- data/lib/nokogiri/css.rb +1 -0
- data/lib/nokogiri/css/node.rb +1 -0
- data/lib/nokogiri/css/parser.rb +1 -0
- data/lib/nokogiri/css/parser_extras.rb +1 -0
- data/lib/nokogiri/css/syntax_error.rb +1 -0
- data/lib/nokogiri/css/tokenizer.rb +1 -0
- data/lib/nokogiri/css/xpath_visitor.rb +3 -1
- data/lib/nokogiri/decorators/slop.rb +1 -0
- data/lib/nokogiri/html.rb +1 -0
- data/lib/nokogiri/html/builder.rb +1 -0
- data/lib/nokogiri/html/document.rb +1 -0
- data/lib/nokogiri/html/document_fragment.rb +1 -0
- data/lib/nokogiri/html/element_description.rb +1 -0
- data/lib/nokogiri/html/element_description_defaults.rb +1 -0
- data/lib/nokogiri/html/entity_lookup.rb +1 -0
- data/lib/nokogiri/html/sax/parser.rb +1 -0
- data/lib/nokogiri/html/sax/parser_context.rb +1 -0
- data/lib/nokogiri/html/sax/push_parser.rb +1 -0
- data/lib/nokogiri/jruby/dependencies.rb +20 -0
- data/lib/nokogiri/syntax_error.rb +1 -0
- data/lib/nokogiri/version.rb +85 -45
- data/lib/nokogiri/xml.rb +1 -0
- data/lib/nokogiri/xml/attr.rb +1 -0
- data/lib/nokogiri/xml/attribute_decl.rb +1 -0
- data/lib/nokogiri/xml/builder.rb +1 -0
- data/lib/nokogiri/xml/cdata.rb +1 -0
- data/lib/nokogiri/xml/character_data.rb +1 -0
- data/lib/nokogiri/xml/document.rb +3 -8
- data/lib/nokogiri/xml/document_fragment.rb +1 -0
- data/lib/nokogiri/xml/dtd.rb +1 -0
- data/lib/nokogiri/xml/element_content.rb +1 -0
- data/lib/nokogiri/xml/element_decl.rb +1 -0
- data/lib/nokogiri/xml/entity_decl.rb +1 -0
- data/lib/nokogiri/xml/entity_reference.rb +1 -0
- data/lib/nokogiri/xml/namespace.rb +1 -0
- data/lib/nokogiri/xml/node.rb +26 -12
- data/lib/nokogiri/xml/node/save_options.rb +1 -0
- data/lib/nokogiri/xml/node_set.rb +1 -0
- data/lib/nokogiri/xml/notation.rb +1 -0
- data/lib/nokogiri/xml/parse_options.rb +4 -3
- data/lib/nokogiri/xml/pp.rb +1 -0
- data/lib/nokogiri/xml/pp/character_data.rb +1 -0
- data/lib/nokogiri/xml/pp/node.rb +1 -0
- data/lib/nokogiri/xml/processing_instruction.rb +1 -0
- data/lib/nokogiri/xml/reader.rb +7 -3
- data/lib/nokogiri/xml/relax_ng.rb +1 -0
- data/lib/nokogiri/xml/sax.rb +1 -0
- data/lib/nokogiri/xml/sax/document.rb +1 -0
- data/lib/nokogiri/xml/sax/parser.rb +1 -0
- data/lib/nokogiri/xml/sax/parser_context.rb +1 -0
- data/lib/nokogiri/xml/sax/push_parser.rb +1 -0
- data/lib/nokogiri/xml/schema.rb +1 -0
- data/lib/nokogiri/xml/searchable.rb +1 -0
- data/lib/nokogiri/xml/syntax_error.rb +1 -0
- data/lib/nokogiri/xml/text.rb +1 -0
- data/lib/nokogiri/xml/xpath.rb +1 -0
- data/lib/nokogiri/xml/xpath/syntax_error.rb +1 -0
- data/lib/nokogiri/xml/xpath_context.rb +1 -0
- data/lib/nokogiri/xslt.rb +1 -0
- data/lib/nokogiri/xslt/stylesheet.rb +1 -0
- data/lib/xsd/xmlparser/nokogiri.rb +1 -0
- metadata +26 -26
- data/lib/nokogiri/2.3/nokogiri.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecb45593f9bd3e8a5e97902104ac19751f950b83ce2b9b5155e3c1147fc2be3a
|
4
|
+
data.tar.gz: 332bba6bf324489e14644bc48a733386873a14465df4063566afbdb7840d6ecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 143d61b0eca788795b0f60d97c0e10ebfd67b081793835e0c869af22451b213c5a5f984f5f1efb36ca872366ad2d83095e7934e54d7d1110a490fc873c8ddc3b
|
7
|
+
data.tar.gz: a3f0c2a5c94ddde8917cb5756a4700eb2aa3e81359ff0ecf7f6af8c63d6bccb14ae00b0331aba6b29f81f74ec8cfa98e597c90c6ec3502b67dbb7d0258f6583f
|
data/README.md
CHANGED
@@ -26,7 +26,7 @@ or CSS3 selectors.
|
|
26
26
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/59c67b0e8976027a45ad/test_coverage)](https://codeclimate.com/github/sparklemotion/nokogiri/test_coverage)
|
27
27
|
|
28
28
|
[![Gem Version](https://badge.fury.io/rb/nokogiri.svg)](https://rubygems.org/gems/nokogiri)
|
29
|
-
[![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score
|
29
|
+
[![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score/?dependency-name=nokogiri&package-manager=bundler)
|
30
30
|
[![Tidelift dependencies](https://tidelift.com/badges/github/sparklemotion/nokogiri)](https://tidelift.com/subscription/pkg/rubygems-nokogiri?utm_source=rubygems-nokogiri&utm_medium=referral&utm_campaign=readme)
|
31
31
|
|
32
32
|
|
@@ -129,27 +129,23 @@ end
|
|
129
129
|
|
130
130
|
## Requirements
|
131
131
|
|
132
|
-
|
133
|
-
to compile native extensions.
|
132
|
+
Ruby 2.4.0 or higher, including any development packages necessary to compile native extensions.
|
134
133
|
|
135
|
-
|
136
|
-
gem, but if you want to use the system versions:
|
134
|
+
In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the gem, but if you want to use the system versions:
|
137
135
|
|
138
|
-
|
139
|
-
|
140
|
-
|
136
|
+
* First, check out [the long list](http://www.xmlsoft.org/news.html)
|
137
|
+
of fixes and changes between releases before deciding to use any
|
138
|
+
version older than is bundled with Nokogiri.
|
141
139
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
140
|
+
* At install time, set the environment variable
|
141
|
+
`NOKOGIRI_USE_SYSTEM_LIBRARIES` or else use the
|
142
|
+
`--use-system-libraries` argument. (See
|
143
|
+
https://nokogiri.org/tutorials/installing_nokogiri.html#install-with-system-libraries
|
144
|
+
for specifics.)
|
147
145
|
|
148
|
-
|
149
|
-
(libxml2-dev/-devel is also required)
|
146
|
+
* libxml2 >=2.6.21 with iconv support (libxml2-dev/-devel is also required)
|
150
147
|
|
151
|
-
|
152
|
-
(libxslt-dev/-devel is also required)
|
148
|
+
* libxslt, built with and supported by the given libxml2 (libxslt-dev/-devel is also required)
|
153
149
|
|
154
150
|
|
155
151
|
## Encoding
|
@@ -191,6 +187,12 @@ explicitly setting the encoding to EUC-JP on the parser:
|
|
191
187
|
We've adopted the Contributor Covenant code of conduct, which you can read in full in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md).
|
192
188
|
|
193
189
|
|
190
|
+
## Semantic Versioning
|
191
|
+
|
192
|
+
[![SemVer compatibility](https://api.dependabot.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score/?dependency-name=nokogiri&package-manager=bundler)
|
193
|
+
|
194
|
+
Nokogiri follows [Semantic Versioning](https://semver.org/). See [`CHANGELOG.md`](CHANGELOG.md) for more details.
|
195
|
+
|
194
196
|
## License
|
195
197
|
|
196
198
|
This project is licensed under the terms of the MIT license.
|
data/ext/nokogiri/extconf.rb
CHANGED
@@ -486,50 +486,60 @@ else
|
|
486
486
|
url: "http://zlib.net/fossils/#{recipe.name}-#{recipe.version}.tar.gz",
|
487
487
|
sha256: dependencies["zlib"]["sha256"]
|
488
488
|
}]
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
489
|
+
if windows?
|
490
|
+
class << recipe
|
491
|
+
attr_accessor :cross_build_p
|
492
|
+
|
493
|
+
def configure
|
494
|
+
Dir.chdir work_path do
|
495
|
+
mk = File.read 'win32/Makefile.gcc'
|
496
|
+
File.open 'win32/Makefile.gcc', 'wb' do |f|
|
497
|
+
f.puts "BINARY_PATH = #{path}/bin"
|
498
|
+
f.puts "LIBRARY_PATH = #{path}/lib"
|
499
|
+
f.puts "INCLUDE_PATH = #{path}/include"
|
500
|
+
mk.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{host}-") if cross_build_p
|
501
|
+
f.puts mk
|
502
|
+
end
|
501
503
|
end
|
502
504
|
end
|
503
|
-
end
|
504
505
|
|
505
|
-
|
506
|
-
|
507
|
-
|
506
|
+
def configured?
|
507
|
+
Dir.chdir work_path do
|
508
|
+
!! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
|
509
|
+
end
|
508
510
|
end
|
509
|
-
end
|
510
511
|
|
511
|
-
|
512
|
-
|
513
|
-
|
512
|
+
def compile
|
513
|
+
execute "compile", "make -f win32/Makefile.gcc"
|
514
|
+
end
|
514
515
|
|
515
|
-
|
516
|
-
|
516
|
+
def install
|
517
|
+
execute "install", "make -f win32/Makefile.gcc install"
|
518
|
+
end
|
519
|
+
end
|
520
|
+
recipe.cross_build_p = cross_build_p
|
521
|
+
else
|
522
|
+
class << recipe
|
523
|
+
def configure
|
524
|
+
execute "configure", ["env", "CHOST=#{host}", "CFLAGS=-fPIC #{ENV['CFLAGS']}", "./configure", "--static", configure_prefix]
|
525
|
+
end
|
517
526
|
end
|
518
527
|
end
|
519
|
-
recipe.cross_build_p = cross_build_p
|
520
528
|
end
|
521
529
|
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
530
|
+
unless nix?
|
531
|
+
libiconv_recipe = process_recipe("libiconv", dependencies["libiconv"]["version"], static_p, cross_build_p) do |recipe|
|
532
|
+
recipe.files = [{
|
533
|
+
url: "http://ftp.gnu.org/pub/gnu/libiconv/#{recipe.name}-#{recipe.version}.tar.gz",
|
534
|
+
sha256: dependencies["libiconv"]["sha256"]
|
535
|
+
}]
|
536
|
+
recipe.configure_options += [
|
537
|
+
"CPPFLAGS=-Wall",
|
538
|
+
"CFLAGS=-O2 -g",
|
539
|
+
"CXXFLAGS=-O2 -g",
|
540
|
+
"LDFLAGS="
|
541
|
+
]
|
542
|
+
end
|
533
543
|
end
|
534
544
|
else
|
535
545
|
if darwin? && !have_header('iconv.h')
|
@@ -617,7 +627,6 @@ EOM
|
|
617
627
|
end
|
618
628
|
|
619
629
|
# Defining a macro that expands to a C string; double quotes are significant.
|
620
|
-
$CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATH=\"#{recipe.path}\"".inspect
|
621
630
|
$CPPFLAGS << ' ' << "-DNOKOGIRI_#{recipe.name.upcase}_PATCHES=\"#{recipe.patch_files.map { |path| File.basename(path) }.join(' ')}\"".inspect
|
622
631
|
|
623
632
|
case libname
|
data/ext/nokogiri/nokogiri.c
CHANGED
@@ -76,24 +76,30 @@ void Init_nokogiri()
|
|
76
76
|
mNokogiriHtmlSax = rb_define_module_under(mNokogiriHtml, "SAX");
|
77
77
|
|
78
78
|
rb_const_set( mNokogiri,
|
79
|
-
rb_intern("
|
79
|
+
rb_intern("LIBXML_COMPILED_VERSION"),
|
80
80
|
NOKOGIRI_STR_NEW2(LIBXML_DOTTED_VERSION)
|
81
81
|
);
|
82
82
|
rb_const_set( mNokogiri,
|
83
|
-
rb_intern("
|
83
|
+
rb_intern("LIBXML_LOADED_VERSION"),
|
84
84
|
NOKOGIRI_STR_NEW2(xmlParserVersion)
|
85
85
|
);
|
86
86
|
|
87
|
+
|
88
|
+
rb_const_set( mNokogiri,
|
89
|
+
rb_intern("LIBXSLT_COMPILED_VERSION"),
|
90
|
+
NOKOGIRI_STR_NEW2(LIBXSLT_DOTTED_VERSION)
|
91
|
+
);
|
92
|
+
rb_const_set( mNokogiri,
|
93
|
+
rb_intern("LIBXSLT_LOADED_VERSION"),
|
94
|
+
NOKOGIRI_STR_NEW2(xsltEngineVersion)
|
95
|
+
);
|
96
|
+
|
87
97
|
#ifdef NOKOGIRI_USE_PACKAGED_LIBRARIES
|
88
98
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qtrue);
|
89
|
-
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATH));
|
90
|
-
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATH));
|
91
99
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXML2_PATCHES), " "));
|
92
100
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), rb_str_split(NOKOGIRI_STR_NEW2(NOKOGIRI_LIBXSLT_PATCHES), " "));
|
93
101
|
#else
|
94
102
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_USE_PACKAGED_LIBRARIES"), Qfalse);
|
95
|
-
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATH"), Qnil);
|
96
|
-
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATH"), Qnil);
|
97
103
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXML2_PATCHES"), Qnil);
|
98
104
|
rb_const_set(mNokogiri, rb_intern("NOKOGIRI_LIBXSLT_PATCHES"), Qnil);
|
99
105
|
#endif
|
data/ext/nokogiri/nokogiri.h
CHANGED
@@ -29,6 +29,7 @@ int vasprintf (char **strp, const char *fmt, va_list ap);
|
|
29
29
|
#include <libxml/relaxng.h>
|
30
30
|
#include <libxml/xinclude.h>
|
31
31
|
#include <libxslt/extensions.h>
|
32
|
+
#include <libxslt/xsltconfig.h>
|
32
33
|
#include <libxml/c14n.h>
|
33
34
|
#include <ruby.h>
|
34
35
|
#include <ruby/st.h>
|
data/ext/nokogiri/xml_document.c
CHANGED
@@ -38,6 +38,15 @@ static void remove_private(xmlNodePtr node)
|
|
38
38
|
node->_private = NULL;
|
39
39
|
}
|
40
40
|
|
41
|
+
static void mark(xmlDocPtr doc)
|
42
|
+
{
|
43
|
+
nokogiriTuplePtr tuple = (nokogiriTuplePtr)doc->_private;
|
44
|
+
if(tuple) {
|
45
|
+
rb_gc_mark(tuple->doc);
|
46
|
+
rb_gc_mark(tuple->node_cache);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
41
50
|
static void dealloc(xmlDocPtr doc)
|
42
51
|
{
|
43
52
|
st_table *node_hash;
|
@@ -588,7 +597,7 @@ VALUE Nokogiri_wrap_xml_document(VALUE klass, xmlDocPtr doc)
|
|
588
597
|
|
589
598
|
VALUE rb_doc = Data_Wrap_Struct(
|
590
599
|
klass ? klass : cNokogiriXmlDocument,
|
591
|
-
|
600
|
+
mark,
|
592
601
|
dealloc,
|
593
602
|
doc
|
594
603
|
);
|
data/ext/nokogiri/xml_node.c
CHANGED
@@ -1332,6 +1332,25 @@ static VALUE line(VALUE self)
|
|
1332
1332
|
return INT2NUM(xmlGetLineNo(node));
|
1333
1333
|
}
|
1334
1334
|
|
1335
|
+
/*
|
1336
|
+
* call-seq:
|
1337
|
+
* line=(num)
|
1338
|
+
*
|
1339
|
+
* Sets the line for this Node. num must be less than 65535.
|
1340
|
+
*/
|
1341
|
+
static VALUE set_line(VALUE self, VALUE num)
|
1342
|
+
{
|
1343
|
+
xmlNodePtr node;
|
1344
|
+
Data_Get_Struct(self, xmlNode, node);
|
1345
|
+
|
1346
|
+
int value = NUM2INT(num);
|
1347
|
+
if (value < 65535) {
|
1348
|
+
node->line = value;
|
1349
|
+
}
|
1350
|
+
|
1351
|
+
return num;
|
1352
|
+
}
|
1353
|
+
|
1335
1354
|
/*
|
1336
1355
|
* call-seq:
|
1337
1356
|
* add_namespace_definition(prefix, href)
|
@@ -1728,6 +1747,7 @@ void init_xml_node()
|
|
1728
1747
|
rb_define_method(klass, "create_external_subset", create_external_subset, 3);
|
1729
1748
|
rb_define_method(klass, "pointer_id", pointer_id, 0);
|
1730
1749
|
rb_define_method(klass, "line", line, 0);
|
1750
|
+
rb_define_method(klass, "line=", set_line, 1);
|
1731
1751
|
rb_define_method(klass, "content", get_native_content, 0);
|
1732
1752
|
rb_define_method(klass, "native_content=", set_native_content, 1);
|
1733
1753
|
rb_define_method(klass, "lang", get_lang, 0);
|
data/ext/nokogiri/xml_schema.c
CHANGED
@@ -133,31 +133,6 @@ static VALUE read_memory(VALUE klass, VALUE content)
|
|
133
133
|
return rb_schema;
|
134
134
|
}
|
135
135
|
|
136
|
-
/* Schema creation will remove and deallocate "blank" nodes.
|
137
|
-
* If those blank nodes have been exposed to Ruby, they could get freed
|
138
|
-
* out from under the VALUE pointer. This function checks to see if any of
|
139
|
-
* those nodes have been exposed to Ruby, and if so we should raise an exception.
|
140
|
-
*/
|
141
|
-
static int has_blank_nodes_p(VALUE cache)
|
142
|
-
{
|
143
|
-
long i;
|
144
|
-
|
145
|
-
if (NIL_P(cache)) {
|
146
|
-
return 0;
|
147
|
-
}
|
148
|
-
|
149
|
-
for (i = 0; i < RARRAY_LEN(cache); i++) {
|
150
|
-
xmlNodePtr node;
|
151
|
-
VALUE element = rb_ary_entry(cache, i);
|
152
|
-
Data_Get_Struct(element, xmlNode, node);
|
153
|
-
if (xmlIsBlankNode(node)) {
|
154
|
-
return 1;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
return 0;
|
159
|
-
}
|
160
|
-
|
161
136
|
/*
|
162
137
|
* call-seq:
|
163
138
|
* from_document(doc)
|
@@ -177,10 +152,6 @@ static VALUE from_document(VALUE klass, VALUE document)
|
|
177
152
|
/* In case someone passes us a node. ugh. */
|
178
153
|
doc = doc->doc;
|
179
154
|
|
180
|
-
if (has_blank_nodes_p(DOC_NODE_CACHE(doc))) {
|
181
|
-
rb_raise(rb_eArgError, "Creating a schema from a document that has blank nodes exposed to Ruby is dangerous");
|
182
|
-
}
|
183
|
-
|
184
155
|
ctx = xmlSchemaNewDocParserCtxt(doc);
|
185
156
|
|
186
157
|
errors = rb_ary_new();
|
data/lib/nokogiri.rb
CHANGED
@@ -1,28 +1,11 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
2
3
|
# Modify the PATH on windows so that the external DLLs will get loaded.
|
3
4
|
|
4
5
|
require 'rbconfig'
|
5
6
|
|
6
7
|
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
|
7
|
-
|
8
|
-
# unless defined?(JRuby::Rack::VERSION) || defined?(AppEngine::ApiProxy)
|
9
|
-
#
|
10
|
-
# However, simply cutting defined?(JRuby::Rack::VERSION) off resulted in
|
11
|
-
# an unable-to-load-nokogiri problem. Thus, now, Nokogiri checks the presense
|
12
|
-
# of appengine-rack.jar in $LOAD_PATH. If Nokogiri is on GAE, Nokogiri
|
13
|
-
# should skip loading xml jars. This is because those are in WEB-INF/lib and
|
14
|
-
# already set in the classpath.
|
15
|
-
unless $LOAD_PATH.to_s.include?("appengine-rack")
|
16
|
-
require 'stringio'
|
17
|
-
require 'isorelax.jar'
|
18
|
-
require 'jing.jar'
|
19
|
-
require 'nekohtml.jar'
|
20
|
-
require 'nekodtd.jar'
|
21
|
-
require 'xercesImpl.jar'
|
22
|
-
require 'serializer.jar'
|
23
|
-
require 'xalan.jar'
|
24
|
-
require 'xml-apis.jar'
|
25
|
-
end
|
8
|
+
require 'nokogiri/jruby/dependencies'
|
26
9
|
end
|
27
10
|
|
28
11
|
begin
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/nokogiri/css.rb
CHANGED
data/lib/nokogiri/css/node.rb
CHANGED
data/lib/nokogiri/css/parser.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Nokogiri
|
2
3
|
module CSS
|
3
4
|
class XPathVisitor # :nodoc:
|
@@ -51,7 +52,8 @@ module Nokogiri
|
|
51
52
|
when /^comment\(/
|
52
53
|
"comment()"
|
53
54
|
when /^has\(/
|
54
|
-
|
55
|
+
is_direct = node.value[1].value[0].nil? # e.g. "has(> a)", "has(~ a)", "has(+ a)"
|
56
|
+
".#{"//" if !is_direct}#{node.value[1].accept(self)}"
|
55
57
|
else
|
56
58
|
args = ['.'] + node.value[1..-1]
|
57
59
|
"#{node.value.first}#{args.join(', ')})"
|
data/lib/nokogiri/html.rb
CHANGED