From f5764ad4bcf0ddfdc7a79e388c4f5190dcf6435c Mon Sep 17 00:00:00 2001 From: Sharun <715417+sharunkumar@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:25:41 -0400 Subject: [PATCH] remove $ from code-blocks in other markdown files as well (#952) * remove $ from code blocks in translations * remove $ from code blocks in the other markdown files as well * Revert "remove $ from code blocks in the other markdown files as well" This reverts commit eda922dab93dd2d2967581650a5c983432ec3a80. * remove $ from code blocks in setup.md * re-added the previous changes * revert logging.md --- TRANSLATIONS.md | 12 ++++++------ src/android/setup.md | 6 +++--- src/cargo.md | 2 +- src/exercises/concurrency/chat-app.md | 4 ++-- src/exercises/concurrency/link-checker.md | 12 ++++++------ 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/TRANSLATIONS.md b/TRANSLATIONS.md index c08da826..66a8bed8 100644 --- a/TRANSLATIONS.md +++ b/TRANSLATIONS.md @@ -31,7 +31,7 @@ You will need the [Gettext] utilities (`msginit`, `msgmerge`). Under Debian and Ubuntu, you can install with: ```shell -$ sudo apt install gettext +sudo apt install gettext ``` Ensure you can build the book, and that `mdbook serve` works. For this, follow @@ -56,7 +56,7 @@ To extract the original English text and generate a `messages.pot` file, you run `mdbook` with a special renderer: ```shell -$ MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \ +MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \ mdbook build -d po ``` @@ -68,7 +68,7 @@ To start a new translation, first generate the `po/messages.pot` file. Then use `msginit` to create a `xx.po` file for the fictional `xx` language: ```shell -$ msginit -i po/messages.pot -l xx -o po/xx.po +msginit -i po/messages.pot -l xx -o po/xx.po ``` You can also simply copy `po/messages.pot` to `po/xx.po`. Then update the file @@ -100,7 +100,7 @@ the `po/xx.po` file with new messages, first extract the English text into a `po/messages.pot` template file. Then run ```shell -$ msgmerge --update po/xx.po po/messages.pot +msgmerge --update po/xx.po po/messages.pot ``` Unchanged messages will stay intact, deleted messages are marked as old, and @@ -129,7 +129,7 @@ output. To use the `po/xx.po` file for your output, run the following command: ```shell -$ MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx +MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx ``` This will update the book's language to `xx`, it will make the `mdbook-gettext` @@ -142,7 +142,7 @@ Like normal, you can use `mdbook serve` to view your translation as you work on it. You use the same command as with `mdbook build` above: ```shell -$ MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx +MDBOOK_BOOK__LANGUAGE=xx mdbook serve -d book/xx ``` When you update the `po/xx.po` file, the translated book will automatically diff --git a/src/android/setup.md b/src/android/setup.md index ae1bded5..407e75c5 100644 --- a/src/android/setup.md +++ b/src/android/setup.md @@ -4,9 +4,9 @@ We will be using an Android Virtual Device to test our code. Make sure you have access to one or create a new one with: ```shell -$ source build/envsetup.sh -$ lunch aosp_cf_x86_64_phone-userdebug -$ acloud create +source build/envsetup.sh +lunch aosp_cf_x86_64_phone-userdebug +acloud create ``` Please see the [Android Developer diff --git a/src/cargo.md b/src/cargo.md index 4384e90b..bb076f88 100644 --- a/src/cargo.md +++ b/src/cargo.md @@ -20,7 +20,7 @@ Along with cargo and rustc, Rustup will install itself as a command line utility On Debian/Ubuntu, you can install Cargo, the Rust source and the [Rust formatter][6] with ```shell -$ sudo apt install cargo rust-src rustfmt +sudo apt install cargo rust-src rustfmt ``` This will allow [rust-analyzer][1] to jump to the definitions. We suggest using diff --git a/src/exercises/concurrency/chat-app.md b/src/exercises/concurrency/chat-app.md index a344d27b..5a0e7516 100644 --- a/src/exercises/concurrency/chat-app.md +++ b/src/exercises/concurrency/chat-app.md @@ -77,13 +77,13 @@ described below. Run the server with: ```shell -$ cargo run --bin server +cargo run --bin server ``` and the client with: ```shell -$ cargo run --bin client +cargo run --bin client ``` ## Tasks diff --git a/src/exercises/concurrency/link-checker.md b/src/exercises/concurrency/link-checker.md index 48896c22..71e42191 100644 --- a/src/exercises/concurrency/link-checker.md +++ b/src/exercises/concurrency/link-checker.md @@ -9,9 +9,9 @@ For this, you will need an HTTP client such as [`reqwest`][1]. Create a new Cargo project and `reqwest` it as a dependency with: ```shell -$ cargo new link-checker -$ cd link-checker -$ cargo add --features blocking,rustls-tls reqwest +cargo new link-checker +cd link-checker +cargo add --features blocking,rustls-tls reqwest ``` > If `cargo add` fails with `error: no such subcommand`, then please edit the @@ -20,14 +20,14 @@ $ cargo add --features blocking,rustls-tls reqwest You will also need a way to find links. We can use [`scraper`][2] for that: ```shell -$ cargo add scraper +cargo add scraper ``` Finally, we'll need some way of handling errors. We use [`thiserror`][3] for that: ```shell -$ cargo add thiserror +cargo add thiserror ``` The `cargo add` calls will update the `Cargo.toml` file to look like this: @@ -72,7 +72,7 @@ fn main() { Run the code in `src/main.rs` with ```shell -$ cargo run +cargo run ``` ## Tasks