Skip to content

Commit

Permalink
fix(clickup): Remove space between # and task id
Browse files Browse the repository at this point in the history
Related #2170
  • Loading branch information
Alissonsz committed May 19, 2023
1 parent f0fae5f commit 558ed01
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/content/clickup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ togglbutton.render('#timeTrackingItem:not(.toggl)', { observe: true }, function
const description = $('.task-name', elem).textContent;
const project = $('.space-name', elem).textContent;

const descriptionParts = description?.split('#')

const formattedDescription = descriptionParts?.reduce((acc, value, index) => {
if (index === descriptionParts.length - 1)
return acc += `#${value.trim()}`
else
return acc += `#${value}`
}, '')

const link = togglbutton.createTimerLink({
className: 'clickup',
description: description,
description: formattedDescription,
projectName: project,
buttonType: 'minimal'
});
Expand Down

0 comments on commit 558ed01

Please sign in to comment.