deckar01-task_list 2.2.0 → 2.2.1

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: 3001d6279d0f9902b6c3a716160cc4461ebd0f5d
4
- data.tar.gz: a430a31c65d93c60d990a28da605034769c28ed8
3
+ metadata.gz: ebe3bef10b2543060da20d370caf02673c1f682b
4
+ data.tar.gz: b1dd8cedf1c8a33d2136deb814e2f357d04bc7a3
5
5
  SHA512:
6
- metadata.gz: a520d9514d2b60e807a3b089934de349a12d163dab3dbb9cdefa869759e7954dfeebdf3f3dcebff7f08ec689e4b7b9ebefde455db8d375bb7849033f4e6bcc74
7
- data.tar.gz: 1d6b284440eead3abbfb4d8d8466bcd96e5ad18d0c50794c5a8dfd14326f697561cd25b19fdac6ac44876daf50f421d85ec94b65edb43e5b5751a870588e0d29
6
+ metadata.gz: d187b31dcd76cafc0ba685ec87595baccd7d2dd278c52e6d0da320d77e9503a630c0ee3f2a7697596a756249433f5910abdfd83633981a955bce99df3b249550
7
+ data.tar.gz: 68be28b14fae6684279ba42fda7e086e2a424692c7cdc455e2cfd12dfc6dd26c801c43b6acc468074d11f7138410be1938993843d44aed81a4ce8211b9ee440a
@@ -238,7 +238,7 @@ class TaskList
238
238
  else if line.match(@startFencesPattern)
239
239
  # Start ignoring lines inside a code block.
240
240
  inCodeBlock = true
241
- else if line in clean && line.match(@itemPattern)
241
+ else if line in clean && line.trim().match(@itemPattern)
242
242
  index += 1
243
243
  if index == itemIndex
244
244
  lineNumber = i + 1
@@ -30,10 +30,10 @@ class TaskList
30
30
  #
31
31
  # Examples
32
32
  #
33
- # Item.new(checkbox_text: "- [x]").complete?
33
+ # Item.new("- [x]").complete?
34
34
  # # => true
35
35
  #
36
- # Item.new(checkbox_text: "- [ ]").complete?
36
+ # Item.new("- [ ]").complete?
37
37
  # # => false
38
38
  #
39
39
  # Returns true for checked list, false otherwise
@@ -1,3 +1,3 @@
1
1
  class TaskList
2
- VERSION = [2, 2, 0].join('.')
2
+ VERSION = [2, 2, 1].join('.')
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deckar01-task_list",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Markdown TaskList components",
5
5
  "main": "dist/task_list.js",
6
6
  "directories": {
@@ -73,6 +73,9 @@
73
73
  <div class="js-task-list-container js-task-list-enable">
74
74
  <div class="markdown">
75
75
  <ul class="task-list">
76
+ <li>
77
+ [ ]
78
+ </li>
76
79
  <li class="task-list-item">
77
80
  <input type="checkbox" class="task-list-item-checkbox" disabled />
78
81
  I'm a task list item
@@ -93,6 +96,7 @@
93
96
  </div>
94
97
  <form action="/update" method="POST" data-remote data-type="json">
95
98
  <textarea name="comment[body]" class="js-task-list-field" cols="40" rows="10">
99
+ - [ ]  
96
100
  - [ ] I'm a task list item
97
101
  - [ ] with non-breaking space
98
102
  - [x] completed, lower
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.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Deckard
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-24 00:00:00.000000000 Z
12
+ date: 2019-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: html-pipeline