Skip to content

Commit 8ae13dc

Browse files
committed
Improve appearance of render help
1 parent 9c25d7d commit 8ae13dc

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

crates/bot/src/bot.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,26 +197,21 @@ fn render_help() -> String {
197197

198198
format!(
199199
"\
200-
Render the given code as an image.
200+
Render Typst code as an image.
201201
202202
Syntax: `?render [pagesize=<page size>] [theme=<theme>] <code block> [...]`
203203
204204
**Flags**
205-
206205
- `pagesize` can be `preview` (default), `auto`, or `default`.
207-
208206
- `theme` can be `dark` (default), `light`, or `transparent`.
209207
210208
To be clear, the full default preamble is:
211-
212209
```
213210
{default_preamble}
214211
```
215-
216212
To remove the preamble entirely, use `pagesize=default theme=transparent`.
217213
218214
**Examples**
219-
220215
```
221216
?render `hello, world!`
222217
@@ -288,7 +283,6 @@ impl<'a> poise::PopArgument<'a> for Rest {
288283
}
289284
}
290285

291-
/// Render Typst code as an image.
292286
#[poise::command(
293287
prefix_command,
294288
track_edits,
@@ -299,11 +293,9 @@ impl<'a> poise::PopArgument<'a> for Rest {
299293
)]
300294
async fn render(
301295
ctx: Context<'_>,
302-
#[description = "Flags"] flags: RenderFlags,
303-
#[description = "Code to render"] code: CodeBlock,
304-
#[rename = "rest"]
305-
#[description = "Extra message content"]
306-
_: Rest,
296+
flags: RenderFlags,
297+
code: CodeBlock,
298+
#[rename = "rest"] _: Rest,
307299
) -> Result<(), PoiseError> {
308300
let pool = &ctx.data().pool;
309301

0 commit comments

Comments
 (0)