Skip to content

Commit

Permalink
🐝 Trim dash from TaskPaper project
Browse files Browse the repository at this point in the history
  • Loading branch information
igrybkov committed Jan 9, 2019
1 parent dc13b28 commit f076723
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/taskpaper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ const getTasks = async () => {
}
}
if (Array.isArray(item.children)) {
const itemProject = item.type === 'project' ? item.value + (project === '' ? '' : ' <- ' + project) : project
collectTasks(item.children, itemProject)
const itemProject = item.value.trim().replace(/^-+|-+$/g, '')
const projectBreadcrumbs = item.type === 'project' ? itemProject + (project === '' ? '' : ' <- ' + project) : project
collectTasks(item.children, projectBreadcrumbs)
}
}
}
Expand Down

0 comments on commit f076723

Please sign in to comment.