mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
vwtask: Require spaces around --
There's -- in Google Drive URLs which I sometimes add to my task descriptions.
This commit is contained in:
parent
9d7d90192b
commit
29adb30f00
2 changed files with 8 additions and 2 deletions
|
@ -175,8 +175,8 @@ class VimwikiTask(object):
|
|||
# * [ ] this is new task
|
||||
# with project:home applied
|
||||
|
||||
if '--' in self['description']:
|
||||
first_part, second_part = self['description'].split('--', 1)
|
||||
if ' -- ' in self['description']:
|
||||
first_part, second_part = self['description'].split(' -- ', 1)
|
||||
|
||||
new_description = first_part.strip()
|
||||
modstring = second_part.strip()
|
||||
|
|
|
@ -99,3 +99,9 @@ class TestParsingVimwikiTask(object):
|
|||
assert vwtask['priority'] == None
|
||||
assert vwtask['due'] == None
|
||||
assert vwtask['uuid'] == None
|
||||
|
||||
def test_not_modstring(self):
|
||||
self.cache.buffer[0] = "* [ ] Task https://somewhere/dash--dash"
|
||||
vwtask = self.VimwikiTask.from_line(self.cache, 0)
|
||||
|
||||
assert vwtask['description'] == u"Task https://somewhere/dash--dash"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue