From 20fb7c62d433addf853b8ab824462fca536aba07 Mon Sep 17 00:00:00 2001 From: Florian Gilcher Date: Mon, 2 Jun 2014 12:37:54 +0200 Subject: docs: Stop using `notrust` Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code. --- src/libstd/fmt.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index 8dc2dd4bdb6..fd3df63ebd4 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -85,7 +85,7 @@ function, but the `format!` macro is a syntax extension which allows it to leverage named parameters. Named parameters are listed at the end of the argument list and have the syntax: -```notrust +```text identifier '=' expression ``` @@ -110,7 +110,7 @@ Each argument's type is dictated by the format string. It is a requirement that every argument is only ever referred to by one type. For example, this is an invalid format string: -```notrust +```text {0:d} {0:s} ``` @@ -126,7 +126,7 @@ must have the type `uint`. Although a `uint` can be printed with `{:u}`, it is illegal to reference an argument as such. For example, this is another invalid format string: -```notrust +```text {:.*s} {0:u} ``` @@ -347,7 +347,7 @@ This example is the equivalent of `{0:s}` essentially. The select method is a switch over a `&str` parameter, and the parameter *must* be of the type `&str`. An example of the syntax is: -```notrust +```text {0, select, male{...} female{...} other{...}} ``` @@ -366,7 +366,7 @@ The plural method is a switch statement over a `uint` parameter, and the parameter *must* be a `uint`. A plural method in its full glory can be specified as: -```notrust +```text {0, plural, offset=1 =1{...} two{...} many{...} other{...}} ``` @@ -394,7 +394,7 @@ should not be too alien. Arguments are formatted with python-like syntax, meaning that arguments are surrounded by `{}` instead of the C-like `%`. The actual grammar for the formatting syntax is: -```notrust +```text format_string := [ format ] * format := '{' [ argument ] [ ':' format_spec ] [ ',' function_spec ] '}' argument := integer | identifier -- cgit 1.4.1-3-g733a5