Skip to content

Commit

Permalink
Merge branch 'master' into feature/links_preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
blandger committed Jul 21, 2024
2 parents 92b6355 + ec996d3 commit 3859cb2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion guide/src/format/configuration/renderers.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ The following configuration options are available:
[`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
CSS media query. Defaults to `navy`.
- **smart-punctuation:** Converts quotes to curly quotes, `...` to ``, `--` to en-dash, and `---` to em-dash.
See [Smart Punctuation].
See [Smart Punctuation](../markdown.md#smart-punctuation).
Defaults to `false`.
- **curly-quotes:** Deprecated alias for `smart-punctuation`.
- **mathjax-support:** Adds support for [MathJax](../mathjax.md). Defaults to
Expand Down
3 changes: 3 additions & 0 deletions src/book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ impl MDBook {
RustEdition::E2021 => {
cmd.args(["--edition", "2021"]);
}
RustEdition::E2024 => {
cmd.args(["--edition", "2024", "-Zunstable-options"]);
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ pub struct RustConfig {
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
/// Rust edition to use for the code.
pub enum RustEdition {
/// The 2024 edition of Rust
#[serde(rename = "2024")]
E2024,
/// The 2021 edition of Rust
#[serde(rename = "2021")]
E2021,
Expand Down
1 change: 1 addition & 0 deletions src/renderer/html_handlebars/hbs_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ fn add_playground_pre(
Some(RustEdition::E2015) => " edition2015",
Some(RustEdition::E2018) => " edition2018",
Some(RustEdition::E2021) => " edition2021",
Some(RustEdition::E2024) => " edition2024",
None => "",
}
};
Expand Down

0 comments on commit 3859cb2

Please sign in to comment.