Format example scripts better.

This commit is contained in:
Stephen Chung
2022-01-20 12:06:36 +08:00
parent 6b06019265
commit b63b4cb3af
22 changed files with 72 additions and 30 deletions

View File

@@ -3,9 +3,9 @@
///
/// # Parameters
///
/// `x` - `i64`
/// `y` - `string`
/// `z` - `bool`
/// * `x` - `i64`
/// * `y` - `string`
/// * `z` - `bool`
///
/// # Notes
///
@@ -13,6 +13,13 @@
///
/// An example is the `rhai-doc` app.
///
/// # Example
///
/// ```rhai
/// let x = foo(42, "hello", true);
///
/// print(x); // prints 47
/// ```
fn foo(x, y, z) {
print(`hello, world! ${if z { x + y.len() } else { x } }`);
}