Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any link, and the text after, is stripped from the task when dragged to a new time. #447

Open
gypsyav opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gypsyav
Copy link

gypsyav commented May 7, 2024

Describe the bug
When there is a link in a task description the link and all text after it is removed when dragging the task to a new time. It also doesn't appear in the planner view.

To Reproduce
Steps to reproduce the behavior:

  1. Add a task with a link such as "go [[here]] for more info"
  2. In the planner notice it will only display "go"
  3. Drag the task to a new time
  4. The original task now reads "go" with no link or text after

Expected behavior
Links appear in planner and are not stripped from the task when it is moved.

@gypsyav gypsyav added the bug Something isn't working label May 7, 2024
@pancan21
Copy link

pancan21 commented Jun 12, 2024

Hey @gypsyav this is unfortunately not reproducible with the steps you provided.
But I reproduced the behavior with additional information:

As long as the task does not end with something like [completion:: 2024-06-12] as done when checking the box with the Tasks plugin enabled, it seems to work fine. To be precise whenever the regex"\[.*::.*\]"gm appears anywhere in the text, only the text before the first bracket is recognized.

This is probably caused by line 40 in src/regexp.ts:
export const propRegexp = /[(.+)::(.*)]/g;

Which is used by line 17-19 in src/util/properties.ts:
export function deleteProps(line: string) {
return line.replaceAll(propRegexp, "").trim();
}

@ivan-lednev As I am not a typescript expert I am not confident enough to fix it myself...

The issue seems to be related to #434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants