Add highlighting to readme
This commit is contained in:
parent
c4cf033b1f
commit
3a816fa7e7
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Highlighing in documentation
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
@ -27,7 +27,7 @@ Add the `extern crate` definition to your `main.rs` or `lib.rs`:
|
|||||||
extern crate evalexpr;
|
extern crate evalexpr;
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can use `evalexpr` to evaluate expressions like this:
|
Then you can use `evalexpr` to **evaluate expressions** like this:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use evalexpr::*;
|
use evalexpr::*;
|
||||||
@ -42,7 +42,7 @@ assert_eq!(eval("1.0 + 2 * 3"), Ok(Value::from(7.0)));
|
|||||||
assert_eq!(eval("true && 4 > 2"), Ok(Value::from(true)));
|
assert_eq!(eval("true && 4 > 2"), Ok(Value::from(true)));
|
||||||
```
|
```
|
||||||
|
|
||||||
And you can use variables and functions in expressions like this:
|
And you can use **variables** and **functions** in expressions like this:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use evalexpr::*;
|
use evalexpr::*;
|
||||||
@ -79,7 +79,7 @@ assert_eq!(eval_boolean_with_configuration("five + 8 > f(twelve)", &configuratio
|
|||||||
assert_eq!(eval_with_configuration("avg(2, 4) == 3", &configuration), Ok(Value::from(true)));
|
assert_eq!(eval_with_configuration("avg(2, 4) == 3", &configuration), Ok(Value::from(true)));
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also precompile expressions like this:
|
You can also **precompile** expressions like this:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use evalexpr::*;
|
use evalexpr::*;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
//! extern crate evalexpr;
|
//! extern crate evalexpr;
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Then you can use `evalexpr` to evaluate expressions like this:
|
//! Then you can use `evalexpr` to **evaluate expressions** like this:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use evalexpr::*;
|
//! use evalexpr::*;
|
||||||
@ -29,7 +29,7 @@
|
|||||||
//! assert_eq!(eval("true && 4 > 2"), Ok(Value::from(true)));
|
//! assert_eq!(eval("true && 4 > 2"), Ok(Value::from(true)));
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! And you can use variables and functions in expressions like this:
|
//! And you can use **variables** and **functions** in expressions like this:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use evalexpr::*;
|
//! use evalexpr::*;
|
||||||
@ -66,7 +66,7 @@
|
|||||||
//! assert_eq!(eval_with_configuration("avg(2, 4) == 3", &configuration), Ok(Value::from(true)));
|
//! assert_eq!(eval_with_configuration("avg(2, 4) == 3", &configuration), Ok(Value::from(true)));
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! You can also precompile expressions like this:
|
//! You can also **precompile** expressions like this:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use evalexpr::*;
|
//! use evalexpr::*;
|
||||||
|
Loading…
Reference in New Issue
Block a user