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.

388 B
Raw Blame
export function normalizeComment(text: string): string {
  return text.replace(/^(?:[ \t]*\r?\n)+/u, "").trimEnd();
}

export function firstLine(text: string): {
  readonly line: string;
  readonly more: boolean;
} {
  const lines = text
    .split(/\r?\n/u)
    .map((line) => line.trim())
    .filter((line) => line !== "");
  return { line: lines[0] ?? "", more: lines.length > 1 };
}