html_tokenizer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/ext/html_tokenizer_ext/tokenizer.c +1 -0
- data/html_tokenizer.gemspec +1 -1
- data/test/unit/parser_test.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18ea0aa757ca8640a78cb619149b306aba21b8cc
|
4
|
+
data.tar.gz: 182b3fab9d73373ae04c45beb3d73eb0798bfb3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d92c656e1c755d7b6e338732444327481af753145ca981e5e35510c44f77eecc5b06cb9eae16b02874f502037ecbf286f817886cb4fe1a5ea196fe77c760feaf
|
7
|
+
data.tar.gz: a57323a2228866046de1176f28f70c0309f24cb8a5fec6e0b486a4c64beaab83dcc32ab059b044c85776edcc1833bf59bb068606fcbd32c7c9ead6ecd032edaa
|
data/Gemfile.lock
CHANGED
@@ -369,6 +369,7 @@ static int scan_open_tag(struct tokenizer_t *tk)
|
|
369
369
|
else if(is_doctype(&tk->scan)) {
|
370
370
|
tokenizer_callback(tk, TOKEN_TAG_START, 1);
|
371
371
|
tokenizer_callback(tk, TOKEN_TAG_NAME, 8);
|
372
|
+
push_context(tk, TOKENIZER_TAG_NAME);
|
372
373
|
return 1;
|
373
374
|
}
|
374
375
|
else if(is_cdata_start(&tk->scan)) {
|
data/html_tokenizer.gemspec
CHANGED
data/test/unit/parser_test.rb
CHANGED
@@ -564,6 +564,15 @@ class HtmlTokenizer::ParserTest < Minitest::Test
|
|
564
564
|
assert_equal 0, @parser.errors_count, "Expected no errors: #{@parser.errors}"
|
565
565
|
end
|
566
566
|
|
567
|
+
def test_doctype_without_space
|
568
|
+
parse('<!DOCTYPE')
|
569
|
+
assert_equal "!DOCTYPE", @parser.tag_name
|
570
|
+
parse('foo')
|
571
|
+
assert_equal "!DOCTYPEfoo", @parser.tag_name
|
572
|
+
|
573
|
+
assert_equal 0, @parser.errors_count, "Expected no errors: #{@parser.errors}"
|
574
|
+
end
|
575
|
+
|
567
576
|
private
|
568
577
|
|
569
578
|
def parse(*parts, &block)
|