Stop URL parsing at empty lines

- Add check for empty lines (after trimming) to stop URL parsing
- URLs now properly end at empty lines, not just whitespace
- More intuitive behavior for multi-line URL detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mario Zechner 2025-06-18 00:26:38 +02:00
parent 97143abc20
commit 06750ed405

View file

@ -572,6 +572,12 @@ export class Terminal extends LitElement {
remainingText = this.getLineText(lines[j]).trim();
}
// Stop if line is empty (after trimming)
if (remainingText === '') {
endLine = j - 1; // URL ended on previous line
break;
}
// Find first whitespace character in this line's text
const whitespaceMatch = remainingText.match(/\s/);
if (whitespaceMatch) {