Merge branch 'worktree-agent-a785be85dc8fbff78'
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
// one with a failed command) split by background-task notices;
|
||||
// `?links=1` answers and operator turns carry a markdown link, an
|
||||
// autolink, a bare URL and URLs inside code (linked too);
|
||||
// `?tables=1` answers carry a wrapping table, one with a long token and
|
||||
// one too wide for a phone (it scrolls sideways);
|
||||
// `?timestamps=1` messages carry recorded times over two calendar days.
|
||||
import 'dart:async';
|
||||
|
||||
@@ -144,9 +146,27 @@ String _answer(int i) {
|
||||
: '';
|
||||
return '## Answer $i\n\nSome **bold** text with `code`.\n\n'
|
||||
'```dart\n${List.generate(8, (l) => 'final v$l = $i * $l;').join('\n')}'
|
||||
'\n```\n$wide\n- one\n- two\n${_links ? _answerLinks : ''}';
|
||||
'\n```\n$wide${_tables ? _answerTables : ''}\n- one\n- two\n'
|
||||
'${_links ? _answerLinks : ''}';
|
||||
}
|
||||
|
||||
bool get _tables => _params['tables'] == '1';
|
||||
|
||||
/// `?tables=1`: a table whose prose wraps to fit, one with a long unbroken
|
||||
/// token, and one whose words cannot fit a phone side by side.
|
||||
const _answerTables =
|
||||
'\n| Column | Description | Status |\n| --- | --- | --- |\n'
|
||||
'| Parser | Reads the markdown source and keeps each table cell as '
|
||||
'written, so wrapping happens only between words | Done |\n'
|
||||
'| Renderer | Lays the cells out at the transcript width | Review |\n\n'
|
||||
'| Commit | Link |\n| --- | --- |\n'
|
||||
'| 4f1c2a9 | https://example.com/pipelines/commit/'
|
||||
'4f1c2a9e0b7d3c6f5a8e1d2c3b4a5f6e7d8c9b0a |\n\n'
|
||||
'| Component | Ownership | Lifecycle | Dependencies | Deployment | '
|
||||
'Monitoring |\n| --- | --- | --- | --- | --- | --- |\n'
|
||||
'| scheduler | platform | long-lived | database | kubernetes | '
|
||||
'prometheus |\n\n';
|
||||
|
||||
const _answerLinks =
|
||||
'\nRead [the release notes](https://example.com/releases/v2) or '
|
||||
'<https://example.com/auto>; the bare https://example.com/bare/path. '
|
||||
|
||||
Reference in New Issue
Block a user