Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

400 B
Raw Blame
// Strip the `Task:` footer Kaneo appends, or every sync adds another one.
const FOOTER = /(?:\r?\n)*-{3}\r?\n<sub>Task: [^<\r\n]+<\/sub>\s*$/;
const FOOTER_ONLY = /^\s*<sub>Task: [^<\r\n]+<\/sub>\s*$/;

export function taskDescriptionFromIssue(body: string | null): string {
  if (!body) {
    return "";
  }

  if (FOOTER_ONLY.test(body)) {
    return "";
  }

  return body.replace(FOOTER, "");
}