mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 14:36:44 +02:00
Import
- Fixed priority and tag bugs in the todo.sh transform. - Began (but have not finished) writing unit tests for this.
This commit is contained in:
parent
641d4356c4
commit
7789692678
2 changed files with 42 additions and 12 deletions
|
@ -51,13 +51,13 @@ while (my $todo = <>)
|
|||
my $due = '';
|
||||
|
||||
# pending + pri + entry
|
||||
if ($todo =~ /^(\([A-Z])\)\s(\d{4}-\d{2}-\d{2})\s(.+)$/i)
|
||||
if ($todo =~ /^\(([A-Z])\)\s(\d{4}-\d{2}-\d{2})\s(.+)$/i)
|
||||
{
|
||||
($status, $priority, $entry, $description) = ('pending', $1, epoch ($2), $3);
|
||||
}
|
||||
|
||||
# pending + pri
|
||||
elsif ($todo =~ /^(\([A-Z])\)\s(.+)$/i)
|
||||
elsif ($todo =~ /^\(([A-Z])\)\s(.+)$/i)
|
||||
{
|
||||
($status, $priority, $description) = ('pending', $1, $2);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ while (my $todo = <>)
|
|||
|
||||
if (@contexts)
|
||||
{
|
||||
$json .= ",\"tags\":\"" . join (',', @contexts) . "\"";
|
||||
$json .= ",\"tags\":[" . join (',', map {"\"$_\""} @contexts) . "]";
|
||||
}
|
||||
|
||||
$json .= ",\"description\":\"${description}\"}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue