deckar01-task_list 2.3.3 → 2.3.4

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
  SHA256:
3
- metadata.gz: 25b1e9330f205a0fdcd27bffcd57709c3b13d45d6554075dc66472d71230421a
4
- data.tar.gz: 575a135f17373ec21748d76cd96cd7143a2846aae8667b8fba7a0d2c10a4312f
3
+ metadata.gz: a298b08198908753ccb6e7d75d867daf8d12c596586bfbc45ab54baf8cff1e3f
4
+ data.tar.gz: c1e7f45c0f827b697813cd5c45d3b3dd9d8d9063e8a219a7cc2292affb25a21c
5
5
  SHA512:
6
- metadata.gz: 6bef865f56600783b7c5da763891fec1fdd2de59152af2f698c481ff936859f60d7a5b5ce3756a90021d82dea1e50894f362701384606c8e4a9ef8ebbd62e739
7
- data.tar.gz: 72cc545b970a28c4fe2b03b2fe271c9ad7304b5a3880305a8aed1f458e7cd67141c73e7f7d3829044bfd6d128cb61c9350b451ccc9af817dec7284e657bb98b1
6
+ metadata.gz: fc40c8f60bb4f1bd6d61919d7252de08f007bd64a2cb6318c420c3c9893c332e84cbcfb77e6215166ff3e5de0cede45fd9941512093aa5366895b515f3e1565b
7
+ data.tar.gz: 1cafaea6e577823575588d5636fc83e607877584a859981c4ed63fcf6bc5e214920ada3d8d92252c7b264bc9184f96b7b5e422cae6208b482081396229d6a3bb
@@ -40,7 +40,7 @@ class TaskList
40
40
  # Pattern used to identify all task list items.
41
41
  # Useful when you need iterate over all items.
42
42
  ItemPattern = /
43
- ^
43
+ \A
44
44
  (?:\s*[-+*]|(?:\d+\.))? # optional list prefix
45
45
  \s* # optional whitespace prefix
46
46
  ( # checkbox
@@ -50,7 +50,7 @@ class TaskList
50
50
  (?=\s) # followed by whitespace
51
51
  /x
52
52
 
53
- ListItemSelector = ".//li[task_list_item(.)]".freeze
53
+ ListItemSelector = ".//li[nokogiri:task_list_item(.)]".freeze
54
54
 
55
55
  class XPathSelectorFunction
56
56
  def self.task_list_item(nodes)
@@ -1,3 +1,3 @@
1
1
  class TaskList
2
- VERSION = [2, 3, 3].join('.')
2
+ VERSION = [2, 3, 4].join('.')
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deckar01-task_list",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Markdown TaskList components",
5
5
  "main": "dist/task_list.js",
6
6
  "directories": {
data/task_list.gemspec CHANGED
@@ -27,9 +27,9 @@ Gem::Specification.new do |gem|
27
27
 
28
28
  gem.add_dependency "activesupport", "~> 4.0" if RUBY_VERSION < '2.2.2'
29
29
  gem.add_dependency "nokogiri", "~> 1.6.0" if RUBY_VERSION < '2.1.0'
30
- gem.add_dependency "html-pipeline"
30
+ gem.add_dependency "html-pipeline", "~> 2.0"
31
31
 
32
- gem.add_development_dependency "commonmarker"
32
+ gem.add_development_dependency "commonmarker", "~> 0.23"
33
33
  gem.add_development_dependency "rake"
34
34
  gem.add_development_dependency "coffee-script"
35
35
  gem.add_development_dependency "json"
@@ -159,6 +159,15 @@ class TaskList::FilterTest < Minitest::Test
159
159
  assert_equal 2, filter(text)[:output].css("[checked]").size
160
160
  end
161
161
 
162
+ def test_dangling_checkbox
163
+ text = <<-md
164
+ - one
165
+ - foo
166
+ [ ] bar
167
+ md
168
+ assert_equal 0, filter(text)[:output].css(@item_selector).size
169
+ end
170
+
162
171
  protected
163
172
 
164
173
  def filter(input, context = @context, result = nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deckar01-task_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Deckard
@@ -9,36 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-08 00:00:00.000000000 Z
12
+ date: 2024-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: html-pipeline
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: '2.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0'
27
+ version: '2.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: commonmarker
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0'
34
+ version: '0.23'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0'
41
+ version: '0.23'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement