Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit 2e9d06b

Browse files
authored
Merge pull request #19 from deckar01/4-optional-link-space
Drop support for link spaces
2 parents f7a5a99 + 6baca1b commit 2e9d06b

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

app/assets/javascripts/task_list.coffee

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,7 @@ class TaskList
190190
#{@escapePattern(@complete)}|
191191
#{@escapePattern(@incomplete)}
192192
)
193-
\s+ # is followed by whitespace
194-
(?!
195-
\(.*?\) # is not part of a [foo](url) link
196-
)
197-
(?= # and is followed by zero or more links
198-
(?:\[.*?\]\s*(?:\[.*?\]|\(.*?\))\s*)*
199-
(?:[^\[]|$) # and either a non-link or the end of the string
200-
)
193+
\s # is followed by whitespace
201194
///
202195

203196
# Used to skip checkbox markup inside of code fences.

test/unit/test_updates.coffee

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -466,20 +466,20 @@ asyncTest "update ignores items that look like Task List items but are links", -
466466
checked: false
467467

468468
field = $ '<textarea>', class: 'js-task-list-field', text: """
469-
- [ ] (link)
470-
- [ ] [reference]
471-
- [ ] () collapsed
472-
- [ ] [] collapsed reference
473-
- [ ] \\(escaped item)
469+
- [ ](link)
470+
- [ ][reference]
471+
- [ ]() collapsed
472+
- [ ][] collapsed reference
473+
- [ ] (no longer a link)
474474
- [ ] item
475475
"""
476476

477477
changes = """
478-
- [ ] (link)
479-
- [ ] [reference]
480-
- [ ] () collapsed
481-
- [ ] [] collapsed reference
482-
- [ ] \\(escaped item)
478+
- [ ](link)
479+
- [ ][reference]
480+
- [ ]() collapsed
481+
- [ ][] collapsed reference
482+
- [ ] (no longer a link)
483483
- [x] item
484484
"""
485485

0 commit comments

Comments
 (0)