Skip to content

Commit

Permalink
docs: revert string formatting change of "jj help util exec"
Browse files Browse the repository at this point in the history
Appears that "cargo test" parses indented text as a code block, and fails to
run doc tests. Spotted by running "cargo insta test". This doc comment is a CLI
help which is usually rendered to console, so I think markdown annotation should
be minimal.

This backs out commit ed84468, "docs: in `jj help util exec`, use Markdown
`warning` admonition."
  • Loading branch information
yuja committed Dec 8, 2024
1 parent 85816f2 commit 6c72a3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions cli/src/commands/util/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ use crate::ui::Ui;
///
/// This is useful for arbitrary aliases.
///
/// !!! warning
/// !! WARNING !!
///
/// The following technique just provides a convenient syntax for running
/// arbitrary code on your system. Using it irresponsibly may cause damage
/// ranging from breaking the behavior of `jj undo` to wiping your file
/// system. Exercise the same amount of caution while writing these aliases
/// as you would when typing commands into the terminal!
/// The following technique just provides a convenient syntax for running
/// arbitrary code on your system. Using it irresponsibly may cause damage
/// ranging from breaking the behavior of `jj undo` to wiping your file system.
/// Exercise the same amount of caution while writing these aliases as you would
/// when typing commands into the terminal!
///
/// This feature may be removed or replaced by an embedded scripting language in
/// the future.
Expand Down
13 changes: 7 additions & 6 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: cli/tests/test_generate_md_cli_help.rs
description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated by a test as an `insta` snapshot. MkDocs includes this snapshot from docs/cli-reference.md."
snapshot_kind: text
---
<!-- BEGIN MARKDOWN-->

Expand Down Expand Up @@ -2214,13 +2215,13 @@ Execute an external command via jj
This is useful for arbitrary aliases.
!!! warning
!! WARNING !!
The following technique just provides a convenient syntax for running
arbitrary code on your system. Using it irresponsibly may cause damage
ranging from breaking the behavior of `jj undo` to wiping your file
system. Exercise the same amount of caution while writing these aliases
as you would when typing commands into the terminal!
The following technique just provides a convenient syntax for running
arbitrary code on your system. Using it irresponsibly may cause damage
ranging from breaking the behavior of `jj undo` to wiping your file system.
Exercise the same amount of caution while writing these aliases as you would
when typing commands into the terminal!
This feature may be removed or replaced by an embedded scripting language in
the future.
Expand Down

0 comments on commit 6c72a3d

Please sign in to comment.