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 +4 -4
- data/lib/task_list/filter.rb +2 -2
- data/lib/task_list/version.rb +1 -1
- data/package.json +1 -1
- data/task_list.gemspec +2 -2
- data/test/task_list/filter_test.rb +9 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a298b08198908753ccb6e7d75d867daf8d12c596586bfbc45ab54baf8cff1e3f
|
4
|
+
data.tar.gz: c1e7f45c0f827b697813cd5c45d3b3dd9d8d9063e8a219a7cc2292affb25a21c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc40c8f60bb4f1bd6d61919d7252de08f007bd64a2cb6318c420c3c9893c332e84cbcfb77e6215166ff3e5de0cede45fd9941512093aa5366895b515f3e1565b
|
7
|
+
data.tar.gz: 1cafaea6e577823575588d5636fc83e607877584a859981c4ed63fcf6bc5e214920ada3d8d92252c7b264bc9184f96b7b5e422cae6208b482081396229d6a3bb
|
data/lib/task_list/filter.rb
CHANGED
@@ -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)
|
data/lib/task_list/version.rb
CHANGED
data/package.json
CHANGED
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.
|
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:
|
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
|