diff --git a/src/book/book.rs b/src/book/book.rs index 071d1589..369c6a07 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -264,6 +264,10 @@ fn load_chapter>( format!("Unable to read \"{}\" ({})", link.name, location.display()) })?; + if content.as_bytes().starts_with(b"\xef\xbb\xbf") { + content = content[3..].to_string() + } + let stripped = location .strip_prefix(&src_dir) .expect("Chapters are always inside a book");