Commit Graph

42 Commits

Author SHA1 Message Date
Michael Bryan f993677626
All tests finally pass! 2017-12-10 22:52:00 +11:00
Michael Bryan 4c6c696c87
Copied across the summary parser and Book structure (doesn't compile) 2017-12-10 22:43:12 +11:00
Chris Spiegel b0b09bad3f Clean up build configuration.
This rolls all "create missing" handling into BuildConfig, and moves the
build-dir option from the "book" table to the "build" table. Some
documentation cleanup surrounding the build table is also updated.
2017-11-30 07:39:58 -08:00
Michael Bryan 1b5137c84e
All tests pass again :) 2017-11-12 21:37:37 +08:00
Michael Bryan 6059883229
Added some basic configuration objects 2017-11-12 21:37:35 +08:00
Jacob Wahlgren 56cee872e8 Box Handlebars template error
See https://github.com/azerupi/mdBook/pull/466#issuecomment-335450110
2017-10-12 21:50:33 +02:00
Pratik Karki 382fc4139b run rustfmt on the repository #398(Updated) (#438)
rustfmt the repository #398
2017-10-03 13:40:23 +02:00
Michal Budzynski ddf31dcc08 Fixed `mdbook test` for {{#playpen file.rs}}
- now `mdbook test` does full link expansion to temp file prior to running
- also minor reformat and cleanup of `HtmlHandlebars::render_item`
2017-08-07 21:42:28 +02:00
Michael Bryan 2f8d5ce263 Removed a lot of the repetition in Theme::new() 2017-08-03 07:01:52 +08:00
Michal Budzynski d7ecb1a80c Rewrite of {{#}} links handling in preprocess module
- 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
2017-08-01 13:50:12 +02:00
Michal Budzynski f3f6b40ea9 Moved playpen.rs `renderer` helper to `preprocess/links.rs` module 2017-08-01 13:50:12 +02:00
messense f2544e0707
Print stdout when `mdbook test` failed 2017-06-28 10:28:50 +08:00
Michael Bryan 487f5ce339 Added error-chain to the renderer module 2017-06-25 00:10:06 +08:00
Michael Bryan 1356e0f068 Added error-chain to the book and utils modules 2017-06-25 00:04:57 +08:00
Michael Bryan 6761442241 Added error-chain to lib.rs 2017-06-24 23:48:50 +08:00
Mathieu David f3cb4265ca Fix typo 2017-06-23 01:10:18 +02:00
Michal Budzynski e8908e32c9 Minor cleanup
- removing need to explicitly use `Path::new` all over the place
- removed warnings from doctests (normally invisible unless `cargo test -- --nocapture`)
- no doctests are norun/ignore now
- updated docs both in book-example and in docs not to refer to nonexisting API's
2017-06-14 21:55:42 +02:00
Mathieu David 70383d0a25 New config structs supports json again (the old style) for a little deprecation period 2017-06-04 20:41:31 +02:00
Mathieu David d3ae2eda56 Replace the old book structure with the new one 2017-06-04 20:41:31 +02:00
Mathieu David 170bf8b1eb New configuration struct + tests #285 2017-06-04 20:41:31 +02:00
Michal Budzynski 75bbd55128 Changes made with rustfmt including `use_try_shorthand`
Updated the project rustfmt.toml to include `use_try_shorthand = true`.
Run rustfmt on all rust sources.
2017-05-19 13:04:37 +02:00
Steve Klabnik 38b3516b60 Implement links in section headers.
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
2017-02-16 17:07:17 -05:00
Corey Farwell 152ebba762 Bump serde, serde_json, and handlebars crates. 2017-02-15 23:31:05 -05:00
Mathieu David 67aee5c192 Switch from rustc_serialize to serde. Closes #18 2016-11-03 01:58:42 +01:00
Gambhiro b584f6eb9c use macros from the log crate, issue #151 2016-08-14 13:34:02 +01:00
Mathieu David 15d26befcc Refactor: Move extern crate definitions to lib.rs 2016-03-27 18:22:17 +02:00
Mathieu David 74fff81e4b Refactor: Move fs related functions from utils into their own submodule 2016-03-17 22:41:00 +01:00
Mathieu David bf114d7e21 Removed the sub module from utils and put the functions directly in the utils module + docs #30 2015-08-06 23:04:19 +02:00
Mathieu David b7214f92a1 Add documentation for MDBook #30 2015-08-06 21:10:59 +02:00
Mathieu David 20bfcd128d Fixed the code examples and added no_run to prevent them from running 2015-08-06 15:04:27 +02:00
Mathieu David 726018307e ignored test, have to fix some bugs before 2015-08-06 12:52:06 +02:00
Mathieu David e725215103 Add rustdoc generated API doc 2015-08-06 12:38:48 +02:00
Mathieu David 01369ea42f Checked the API, moved handlebars theme handling to the theme module to expose it to every renderer. Closes #28 2015-08-05 22:35:26 +02:00
Mathieu David 22280bbb16 Add debug! macro that can be activated using the "debug" feature. #19 2015-08-03 18:06:01 +02:00
Mathieu David 5bd1385212 Added a utils module for general / common functions 2015-07-30 15:20:55 +02:00
Mathieu David 4d4f35ecba First big step for the html renderer, it reads an handlebars template and creates the files from SUMMARY.md respecting the source folder structure 2015-07-19 00:08:38 +02:00
Mathieu David 7fa5b06ccb Rudimentary: Parse SUMMARY.md, support for nested levels. Only list items: "- [name](path)" or "* [name](path)" #2 2015-07-18 00:04:20 +02:00
Mathieu David 4fe0bc2de5 renamed directory + created BookItem 2015-07-16 19:26:16 +02:00
Mathieu David ad01c37432 clean up structure and code 2015-07-16 18:20:36 +02:00
Mathieu David 4d884b9c40 Added BookConfig struct, cleaned up some parts 2015-07-08 15:17:11 +02:00
Mathieu David a27bc498eb Started to implement init 2015-07-07 02:56:19 +02:00
Mathieu David d5a8d7f3a1 Initial commit 2015-07-06 14:21:59 +02:00