Show selection over inline code; link URLs inside code

An opaque inline-code fill painted over the selection highlight, so a
selected code span looked unselected; it now keeps half the fill. Bare
URLs inside inline code, fenced blocks and operator messages' backticks
are now links like any other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 19:23:47 +00:00
parent fc3bb5a004
commit 54be08994b
8 changed files with 98 additions and 55 deletions
@@ -52,14 +52,18 @@ void main() {
expect(_targets('www. and www.example'), isEmpty);
});
test('skips inline code and fenced code', () {
test('finds links in inline code and fenced code too', () {
expect(_targets('run `curl https://x.com/a` then https://y.com/b'), [
'https://x.com/a',
'https://y.com/b',
]);
expect(_targets('```\ncurl https://x.com/a\n```\nhttps://y.com/b'), [
'https://x.com/a',
'https://y.com/b',
]);
expect(_targets('```\nunclosed https://x.com'), isEmpty);
expect(findTextLinks('`https://x.com`'), [
const ChatTextLink(1, 14, 'https://x.com'),
]);
});
test('a markdown link in plain text links its target in place', () {