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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e620e43f97a82c4cb3aae2067a2666325b453a5
4
- data.tar.gz: 57784c1b53c4faefe2ab3b6e222836bfad852d8c
3
+ metadata.gz: 18ea0aa757ca8640a78cb619149b306aba21b8cc
4
+ data.tar.gz: 182b3fab9d73373ae04c45beb3d73eb0798bfb3b
5
5
  SHA512:
6
- metadata.gz: 3b7a26cc219ea9f5885999146015e8137264ee51b43e5e6929d377cc2447ca6d4c1d5804e32954c24b2b807a19edcaf1f9cc708e7b5a0f83b086e16a21c8fa3e
7
- data.tar.gz: 46beb0ed1994fe7468ab89451de1af830251da73d15c5d0943d30b70080806a458a7531a9fb7df2d7640e5ba1a195706eb84bf8896ef9184a207a1477747c200
6
+ metadata.gz: d92c656e1c755d7b6e338732444327481af753145ca981e5e35510c44f77eecc5b06cb9eae16b02874f502037ecbf286f817886cb4fe1a5ea196fe77c760feaf
7
+ data.tar.gz: a57323a2228866046de1176f28f70c0309f24cb8a5fec6e0b486a4c64beaab83dcc32ab059b044c85776edcc1833bf59bb068606fcbd32c7c9ead6ecd032edaa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- html_tokenizer (0.0.2)
4
+ html_tokenizer (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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)) {
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "html_tokenizer"
3
- spec.version = "0.0.2"
3
+ spec.version = "0.0.3"
4
4
  spec.summary = "HTML Tokenizer"
5
5
  spec.author = "Francois Chagnon"
6
6
 
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francois Chagnon