* Added a mechanism for creating alternate backends
* Added a CmdRenderer and the ability to have multiple renderers
* Made MDBook::load() autodetect renderers
* Added a couple methods to RenderContext
* Converted RenderContext.version to a String
* Made sure all alternate renderers are invoked as `mdbook-*`
* Factored out the logic for determining which renderer to use
* Added tests for renderer detection
* Made it so `mdbook test` works on the book-example again
* Updated the "For Developers" docs
* Removed `[output.epub]` from the example book's book.toml
* Added a bit more info on how backends should work
* Added a `destination` key to the RenderContext
* Altered how we wait for an alternate backend to finish
* Refactored the Renderer trait to not use MDBook and moved livereload to the template
* Moved info for developers out of the book.toml format chapter
* MOAR docs
* MDBook::build() no longer takes &mut self
* Replaced a bunch of println!()'s with proper log macros
* Cleaned up the build() method and backend discovery
* Added a couple notes and doc-comments
* Found a race condition when backends exit really quickly
* Added support for backends with arguments
* Fixed a funny doc-comment
* Implement partial include of source files.
The macro `{{include some_file}}` accepts now optional line number
arguments, s.t. the specified line range is included. The following
forms are supported:
* `{{include some_file::}}` is equivalent to `{{include some_file}}`
* `{{include some_file:from:}}` includes lines [from, infinity)
* `{{include some_file::to}}` includes lines [0, to]
* `{{include some_file:from:to}}` includes lines [from, to]
* Remove the special case IncludeFull which is IncludeFrom(0).
* Use Range, RangeFrom, RangeTo and RangeFull to represent include-ranges.
Also:
* Move out introduced methods as free functions.
* Introduce RangeArgument trait as long it is unstable in stdlib.
* Use itertools for joining of lines on the fly.
* Split tests.
* Simplify include file argument parsing.
* Make utils::string private and link collections_range feature issue.
* Created regression tests for the table of contents
* Refactoring to make the test more readable
* Fixed some bitrot and removed the (now redundant) tests/helper module
* Removed the include_str!() stuff and use just the dummy book for testing
* Regression tests now pass again!
* Pinned a `*` dependency to use a particular version
* Made sure test mocks return errors instead of panicking
* Addressed the rest of @budziq's review
* Replaced a file open/read with file_to_string
IIUC, the existing exclude rule has meant to do what it will do in the
future (gitignore-like matching, not glob-only matching). This fix makes
the rule to do what it was expected to do, and is forward-compatible,
therefore fixing the warning messages.
The toml crate removed its serde dependency in 0.3, but in 0.4, it
went away. Cargo didn't warn on this, but now it does. As such, we
need a release so that rust's build doesn't warn constantly.
- Replaced link parser with a Regex
- Implemented {{#include}} links
- Will display relatively nice error when cannot open {{#}} linked file
- Escaped links no longer render with escape char
- utils::fs::file_to_path no takes AsRef<Path>
- sorted export/mod in lib.rs
On `x86_64-unknown-linux-musl` it looks like travis can't compile
the `backtrace-sys` crate because the `./configure` step fails.
The error message `./configure` gives is:
configure: error: in `/home/travis/build/azerupi/mdBook/target/x86_64-unknown-linux-musl/debug/build/backtrace-sys-204dc57c91e9a514/out':
configure: error: C compiler cannot create executables
This project already had a transitive dependency on regex; let's use it.
This isn't the most efficient solution, but it should be fine. It ends
up doing five full scans of the text. There's probably an easier way but
I'm mostly just trying to get this to work for now.
This also implements the same algorithm that rustdoc does for generating
the name for the link.
Fixes#204