From 6c72a3d1c16c85d6b0609b20aff7d97778544f3a Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sun, 8 Dec 2024 17:31:59 +0900 Subject: [PATCH] docs: revert string formatting change of "jj help util exec" 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 ed84468cb8f3, "docs: in `jj help util exec`, use Markdown `warning` admonition." --- cli/src/commands/util/exec.rs | 12 ++++++------ cli/tests/cli-reference@.md.snap | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/cli/src/commands/util/exec.rs b/cli/src/commands/util/exec.rs index f59f93a6e0..796b3c736d 100644 --- a/cli/src/commands/util/exec.rs +++ b/cli/src/commands/util/exec.rs @@ -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. diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 890765ac53..b3083eb360 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -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 --- @@ -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.