mdBook/src/renderer/html_handlebars
Tomasz Różański 95fba3f357 Add a case for an empty book_title parameter
Html page title for every chapter in the book is created by the following code:
```rust
let title: String;
{
	let book_title = ctx
	.data
	.get("book_title")
	.and_then(serde_json::Value::as_str)
	.unwrap_or("");

	title = ch.name.clone() + " - " + book_title;
}
```

If the `book.toml` file is missing, and `book_title` parameter is empty, there's an awkward ` - ` string hanging at the end of each chapter's title.

This PR adds a `match` case to handle that kind of situation.
2020-02-15 23:13:37 +01:00
..
helpers Upgrade pulldown_cmark to 0.6.1 2019-11-11 20:25:38 +01:00
hbs_renderer.rs Add a case for an empty book_title parameter 2020-02-15 23:13:37 +01:00
mod.rs Search with Elasticlunr, updated (#604) 2018-03-07 21:02:06 +08:00
search.rs Upgrade pulldown_cmark to 0.6.1 2019-11-11 20:25:38 +01:00