```ts
function lineNumber(block: string): string {
  if (!block) return '';

  const lines = block.split('\n');
  const maxLength = Math.max(...lines.map(line => line.length));

  return lines.map((line, index) => `${index + 1}: ${line.padEnd(maxLength, ' ')}`).join('\n');
}
```