Add highlighting to readme

This commit is contained in:
Sebastian Schmidt 2019-03-21 09:29:04 +02:00
parent c4cf033b1f
commit 3a816fa7e7
3 changed files with 8 additions and 6 deletions

View File

@ -6,6 +6,8 @@
### Changed
* Highlighing in documentation
### Fixed
### Deprecated

View File

@ -27,7 +27,7 @@ Add the `extern crate` definition to your `main.rs` or `lib.rs`:
extern crate evalexpr;
```
Then you can use `evalexpr` to evaluate expressions like this:
Then you can use `evalexpr` to **evaluate expressions** like this:
```rust
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)));
```
And you can use variables and functions in expressions like this:
And you can use **variables** and **functions** in expressions like this:
```rust
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)));
```
You can also precompile expressions like this:
You can also **precompile** expressions like this:
```rust
use evalexpr::*;

View File

@ -14,7 +14,7 @@
//! extern crate evalexpr;
//! ```
//!
//! Then you can use `evalexpr` to evaluate expressions like this:
//! Then you can use `evalexpr` to **evaluate expressions** like this:
//!
//! ```rust
//! use evalexpr::*;
@ -29,7 +29,7 @@
//! 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
//! use evalexpr::*;
@ -66,7 +66,7 @@
//! 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
//! use evalexpr::*;