nokogumbo 1.4.10 → 1.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/nokogumboc/nokogumbo.c +7 -0
- data/test-nokogumbo.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db71be04413780e16757ce18152b4841db79dc8
|
4
|
+
data.tar.gz: 4b33b6a76a1add1a39615e973218ae89cab22592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f292053fef636c5d57b8f76ecb8a5eda0994149e95a58b5a1968347364050a278a9302f21515bd08c7bf4ce0000f7ae706fca888b1c90b4f3c9f2cdb4c13919
|
7
|
+
data.tar.gz: fd47e4204807f5d0dc0e7821efdc35a292530a08ba1d878d2b155db34acad33bd0f98c4575e3103ebf29f679f3667f2e14bbbe40305a8cc81a8920c0adf7ce0c
|
data/ext/nokogumboc/nokogumbo.c
CHANGED
@@ -227,6 +227,13 @@ static VALUE parse(VALUE self, VALUE string) {
|
|
227
227
|
for (int i=0; i < errors->length; i++) {
|
228
228
|
GumboError *err = errors->data[i];
|
229
229
|
gumbo_string_buffer_clear(&parser, &msg);
|
230
|
+
// Work around bug in gumbo_caret_diagnostic_to_string.
|
231
|
+
// See https://github.com/google/gumbo-parser/pull/371
|
232
|
+
// The bug occurs when the error starts with a newline (unless it's the
|
233
|
+
// first character in the input--but that shouldn't cause an error in
|
234
|
+
// the first place.
|
235
|
+
if (*err->original_text == '\n' && err->original_text != input)
|
236
|
+
--err->original_text;
|
230
237
|
gumbo_caret_diagnostic_to_string(&parser, err, input, &msg);
|
231
238
|
VALUE err_str = rb_str_new(msg.data, msg.length);
|
232
239
|
VALUE syntax_error = rb_class_new_instance(1, &err_str, XMLSyntaxError);
|
data/test-nokogumbo.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokogumbo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.6.11
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Nokogiri interface to the Gumbo HTML5 parser
|