Skip to content

Remove automatic $ prefix for bash and console code blocks #1261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Pages via GitHub Actions.
To build the site locally:

```console
> git clone https://github.com/rust-lang/blog.rust-lang.org
> cd blog.rust-lang.org
> cargo run
$ git clone https://github.com/rust-lang/blog.rust-lang.org
$ cd blog.rust-lang.org
$ cargo run
```

You could do it in release mode if you'd like, but it's pretty fast in debug.
Expand All @@ -23,13 +23,13 @@ From there, the generated HTML will be in a `site` directory.
Open `site/index.html` in your web browser to view the site.

```console
> firefox site/index.html
$ firefox site/index.html
```

You can also run a server, if you need to preview your changes on a different machine:

```console
> cargo run -p serve
$ cargo run -p serve
Serving on: http://192.168.123.45:8000
```

Expand Down
2 changes: 1 addition & 1 deletion posts/2015-10-29-Rust-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ information about what it is
changing.](https://github.com/rust-lang/cargo/pull/1931) For example:

```console
cargo update
$ cargo update
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating libc v0.1.8 -> v0.1.10
Updating memchr v0.1.3 -> v0.1.5
Expand Down
16 changes: 8 additions & 8 deletions posts/2016-05-05-cargo-pillars.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Now that we've added the `time` crate, let's see what happens if we ask Cargo to
build our package:

```console
cargo build
$ cargo build
Compiling winapi v0.2.6
Compiling libc v0.2.10
Compiling winapi-build v0.1.1
Expand All @@ -174,14 +174,14 @@ up into smaller crates that do one thing and do it well**.
Now that we successfully built our crate, what happens if we try to build it again?

```console
cargo build
$ cargo build
```

Nothing happened at all. Why's that? We can always ask Cargo to give us more
information through the `--verbose` flag, so let's do that:

```console
cargo build --verbose
$ cargo build --verbose
Fresh libc v0.2.10
Fresh winapi v0.2.6
Fresh winapi-build v0.1.1
Expand Down Expand Up @@ -240,7 +240,7 @@ To do this, we check in our `Cargo.lock` and clone the repository on our new
machine. Then, we run `cargo build` again.

```console
cargo build
$ cargo build
Compiling libc v0.2.10
Compiling winapi v0.2.6
Compiling winapi-build v0.1.1
Expand Down Expand Up @@ -271,7 +271,7 @@ fn main() {
To run the example, we ask Cargo to build and run it:

```console
cargo run --example date
$ cargo run --example date
Compiling datetime v0.1.0 (file:///Users/ykatz/Code/datetime)
Running `target/debug/examples/date`
26 Apr 2016 :: 05:03:38
Expand Down Expand Up @@ -322,7 +322,7 @@ to our package:
After using the crate in our library, let's run `cargo build` again:

```console
cargo build
$ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading tz v0.2.1
Downloading byteorder v0.5.1
Expand Down Expand Up @@ -386,7 +386,7 @@ fn bench_date(b: &mut Bencher) {
If we then run `cargo bench`:

```console
cargo bench
$ cargo bench
Compiling winapi v0.2.6
Compiling libc v0.2.10
Compiling byteorder v0.5.1
Expand Down Expand Up @@ -450,7 +450,7 @@ library for Unix-specific functionality.
As before, when I run `cargo build`, Cargo *conservatively* adds `nix` and its dependencies:

```console
cargo build
$ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Downloading nix v0.5.0
Downloading bitflags v0.4.0
Expand Down
2 changes: 1 addition & 1 deletion posts/2016-05-13-rustup.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ stable toolchain that targets the 64-bit, MSVC ABI.
[abi]: https://www.rust-lang.org/downloads.html#win-foot

```console
rustup default stable-x86_64-pc-windows-msvc
$ rustup default stable-x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: downloading component 'rustc'
info: downloading component 'rust-std'
Expand Down
2 changes: 1 addition & 1 deletion posts/2016-08-10-Shape-of-errors-to-come.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Today, when you can call `--explain`, you pass an error code. The compiler then
an extended message that goes into more detail about how errors of that form occur:

```console
rustc --explain E0200
$ rustc --explain E0200

Unsafe traits must have unsafe implementations. This error occurs when an
implementation for an unsafe trait isn't marked as unsafe. This may be resolved
Expand Down
2 changes: 1 addition & 1 deletion posts/2016-09-08-incremental.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ time since implementation started towards the end of last year, all of the
been done. You can give it a try in the nightly version of the compiler:

```console
rustc -Zincremental=<path> ./main.rs
$ rustc -Zincremental=<path> ./main.rs
```

This will start the compiler in **incremental mode**, using whatever `<path>`
Expand Down
2 changes: 1 addition & 1 deletion posts/2016-09-29-Rust-1.12.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ we showed above, at the start of the post? Here's an example of attempting to
compile that code while passing the `--error-format=json` flag:

```bash
rustc borrowck-assign-comp.rs --error-format=json
$ rustc borrowck-assign-comp.rs --error-format=json
{"message":"cannot assign to `p.x` because it is borrowed","level":"error","spans":[{"file_name":"borrowck-assign-comp.rs","byte_start":562,"byte_end":563,"line_start":15,"line_end":15,"column_start":14,"column_end":15,"is_primary":false,"text":[{"text":" let q = &p;","highlight_start":14,"highlight_end":15}],"label":"borrow of `p.x` occurs here","suggested_replacement":null,"expansion":null}],"label":"assignment to borrowed `p.x` occurs here","suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":null}
```
Expand Down
2 changes: 1 addition & 1 deletion posts/2016-12-22-Rust-1.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ small taste of how it works, once you have [emscripten] installed, compiling
some Rust code to WebAssembly is as easy as:

```bash
rustup target add wasm32-unknown-emscripten
$ rustup target add wasm32-unknown-emscripten
$ echo 'fn main() { println!("Hello, Emscripten!"); }' > hello.rs
$ rustc --target=wasm32-unknown-emscripten hello.rs
$ node hello.js
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-02-02-Rust-1.15.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.15 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-02-09-Rust-1.15.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.15.1 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [download Rust][install] from the
Expand Down
8 changes: 4 additions & 4 deletions posts/2017-03-16-Rust-1.16.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.16 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down Expand Up @@ -115,7 +115,7 @@ will live as long as `Name`, which is required for `Name` to be valid. Let's try
code with Rust 1.15.1:

```bash
rustc +1.15.1 foo.rs --crate-type=lib
$ rustc +1.15.1 foo.rs --crate-type=lib
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
--> .\foo.rs:10:5
|
Expand All @@ -139,7 +139,7 @@ The compiler explains the issue, and gives a helpful suggestion. So let's try it
the `'a`, and compile again:

```bash
rustc +1.15.1 .\foo.rs --crate-type=lib
$ rustc +1.15.1 .\foo.rs --crate-type=lib
error[E0308]: method not compatible with trait
--> .\foo.rs:10:5
|
Expand All @@ -164,7 +164,7 @@ It still doesn't work. That help message was not actually helpful. It does sugge
lifetime, this time on `Name`. If we do that...

```bash
rustc +1.15.1 .\foo.rs --crate-type=lib
$ rustc +1.15.1 .\foo.rs --crate-type=lib
<snip>
help: consider using an explicit lifetime parameter as shown: fn from_str(s: &'a str) -> Result<Name<'a>, ()>
--> .\foo.rs:10:5
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-04-27-Rust-1.17.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.17 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-06-08-Rust-1.18.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.18 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-07-20-Rust-1.19.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.19 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-08-31-Rust-1.20.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ is a systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.20 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-10-12-Rust-1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ is a systems programming language focused on safety, speed, and concurrency.
If you have a previous version of Rust installed, getting Rust 1.21 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2017-11-22-Rust-1.22.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.22.1 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-01-04-Rust-1.23.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.23.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
4 changes: 2 additions & 2 deletions posts/2018-02-15-Rust-1.24.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.24.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand All @@ -33,7 +33,7 @@ of "standard style." With this release, we're happy to announce that a *preview*
can be used with 1.24 stable. To give it a try, do this:

```bash
rustup component add rustfmt-preview
$ rustup component add rustfmt-preview
```

There are two important aspects here: first, you're using `rustup component
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-03-01-Rust-1.24.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.24.1 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-03-29-Rust-1.25.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.25.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-05-10-Rust-1.26.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.26.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
4 changes: 2 additions & 2 deletions posts/2018-05-29-Rust-1.26.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.26.1 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down Expand Up @@ -124,7 +124,7 @@ This was unfortunately fixed too late to make it into 1.26 stable, so we added
the patch for 1.26.1 to permit users to install Rust on these platforms.

```console
rustup update
$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-freebsd'
info: latest update on 2018-05-10, rust version 1.26.0 (a77568041 2018-05-07)
error: component 'rust-docs' for 'x86_64-unknown-freebsd' is unavailable for download
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-06-05-Rust-1.26.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.26.2 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-06-21-Rust-1.27.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.27.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-07-10-Rust-1.27.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.27.1 is as easy as:

```console
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-07-20-Rust-1.27.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.27.2 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
2 changes: 1 addition & 1 deletion posts/2018-08-02-Rust-1.28.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have a previous version of Rust installed via rustup, getting Rust
1.28.0 is as easy as:

```bash
rustup update stable
$ rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
Expand Down
Loading