From e0f9e0123456997f6f0153cd3ca615e6052e80b3 Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Tue, 11 Jun 2024 10:27:53 -0400 Subject: [PATCH] Use/fix ron code blocks --- README.md | 4 ++-- docs/extensions.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f365495df..caac0faa7 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ structs, enums, tuples, arrays, generic maps, and primitive values. ## Example -```rust,ignore +```ron GameConfig( // optional struct name window_size: (800, 600), window_title: "PAC-MAN", @@ -98,7 +98,7 @@ There also is a very basic, work in progress specification available on ### Same example in RON -```rust,ignore +```ron Scene( // class name is optional materials: { // this is a map "metal": ( diff --git a/docs/extensions.md b/docs/extensions.md index af5401f6f..aa20f5e6f 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -21,7 +21,7 @@ struct Object { Without `unwrap_newtypes`, because the value `5` can not be saved into `NewType(u32)`, your RON document would look like this: -``` ron +```ron ( new_type: (5), ) @@ -29,7 +29,7 @@ Without `unwrap_newtypes`, because the value `5` can not be saved into `NewType( With the `unwrap_newtypes` extension, this coercion is done automatically. So `5` will be interpreted as `(5)`. -``` ron +```ron #![enable(unwrap_newtypes)] ( new_type: 5, @@ -98,7 +98,7 @@ pub enum Enum { Without `unwrap_variant_newtypes`, your RON document would look like this: -``` ron +```ron ( variant: A(Inner(a: 4, b: true)), ) @@ -106,7 +106,7 @@ Without `unwrap_variant_newtypes`, your RON document would look like this: With the `unwrap_variant_newtypes` extension, the first structural layer inside a newtype variant will be unwrapped automatically: -``` ron +```ron #![enable(unwrap_newtypes)] ( variant: A(a: 4, b: true),