Michael Bryan
01bab56faf
The summary parser integration test passes!
2017-06-29 20:53:18 +08:00
Michael Bryan
c3124bc8f3
Summary parser handles suffixes and now all that's left to do is adjusting section numbers
2017-06-29 20:36:03 +08:00
Michael Bryan
1e757529d7
Added pretty-assertions as a dev dependency (makes comparing deep structures easier)
2017-06-29 20:05:57 +08:00
Michael Bryan
1e8bc1c384
Fleshed out the step_numbered() method some more
2017-06-29 20:05:24 +08:00
Michael Bryan
42de0fb97a
Added a full integration test for the summary parser (ignored for the time being)
2017-06-29 19:27:47 +08:00
Michael Bryan
68ebb62dbf
Forgot PathBuf doesn't implement Default on stable
2017-06-29 17:20:46 +08:00
Michael Bryan
66e4898c44
Can parse the numbered sections and correctly add the items found to the summary
2017-06-29 17:17:52 +08:00
Michael Bryan
56dad889db
Added some of the infrastructure for parsing the nested section and updating the summary ergonomically
2017-06-29 00:06:43 +08:00
Michael Bryan
bfc9112c06
Separators and links in the prefix chapters are parsed correctly
2017-06-28 19:58:52 +08:00
Michael Bryan
df2ee64b2e
Added the prefix chapter parsing step and a failing test for separators
2017-06-28 19:58:11 +08:00
Michael Bryan
dcc8368543
Encoded the first state in the SummaryParser
2017-06-27 23:46:07 +08:00
Michael Bryan
dacb3e082e
Can now parse a single item (link to a chapter)
2017-06-27 23:46:07 +08:00
Michael Bryan
588b444f06
Tried to make summary parsing easier to understand and implement by writing out the EBNF grammar
2017-06-27 23:46:07 +08:00
Michael Bryan
eb839e4298
Added a SectionNumber newtype to represent section numbering ("1.2.3")
2017-06-27 23:46:07 +08:00
Michael Bryan
c68a29c3c5
added a parse_summary() method to the Loader
2017-06-27 23:46:07 +08:00
Michael Bryan
1e60d6b53c
Created a new Loader module and some stubs
2017-06-27 23:46:07 +08:00
Mathieu David
4974d2cfa1
Merge pull request #362 from budziq/nonopt_htmlconfig
...
Make HtmlConfig is no longer optional
2017-06-27 14:33:56 +02:00
Michal Budzynski
b1ca9cf5b5
HtmlConfig is no longer optional
...
`HtmlConfig` was both guaranteed to exist within `BookConfig`
and `expect`ed in few places.
This simplifies the API a little by representing the fact that
`HtmlConfig` is currently mandatory for proper mdBook binary operation.
2017-06-27 14:01:33 +02:00
Mathieu David
5a27207844
Merge pull request #366 from budziq/split_commands
...
Split commands to separate files and register conditional ones if required features enabled
2017-06-27 13:37:57 +02:00
Michal Budzynski
5e088d92c9
Merge remote-tracking branch 'upstream/master' into split_commands
2017-06-27 13:06:19 +02:00
Mathieu David
ea0c8ddea6
Merge pull request #364 from budziq/clippy_nits
...
Correct clippy complaints
2017-06-27 12:17:10 +02:00
Michal Budzynski
b3c9ba4555
Correct clippy nits
2017-06-27 09:08:58 +02:00
Michal Budzynski
7f51039f9a
Rename and move the clap sub-command generation functions
2017-06-27 07:59:50 +02:00
Michal Budzynski
7799ce285e
Do not use wildcard imports if not needed
2017-06-26 23:17:46 +02:00
Michal Budzynski
fe62d0c407
Merge remote-tracking branch 'upstream/master' into split_commands
2017-06-26 23:11:00 +02:00
Mathieu David
c9a117cc4e
Merge pull request #361 from Michael-F-Bryan/error-chain
...
Add error-chain throughout the codebase
2017-06-26 17:07:51 +02:00
Mathieu David
13ab20ea49
Merge pull request #363 from budziq/opt_mathjax
...
Make MathJax support optional
2017-06-26 17:01:52 +02:00
Michal Budzynski
f3c8535870
Extracted `mdbook test` and `mdbook init` to separate files/modules
2017-06-26 01:24:33 +02:00
Michal Budzynski
35ed9fc286
corrected indentation in `serve` and `watch` subcommands definitions
2017-06-26 01:22:38 +02:00
Michal Budzynski
efdd0330c1
Extracted `mdbook init` to separate file/module
2017-06-26 01:02:32 +02:00
Michal Budzynski
4c78fdf431
Extracted `mdbook build` to separate file/module
2017-06-26 01:00:18 +02:00
Michal Budzynski
b09fdf07e4
Register `serve` and `watch` subcommands only if given features enabled
2017-06-26 00:43:28 +02:00
Michal Budzynski
5c524da3c2
Extracted `mdbook watch` to separate file/module
2017-06-25 23:44:28 +02:00
Michal Budzynski
99224f40d5
Extracted `mdbook serve` to separate file/module
2017-06-25 23:05:58 +02:00
Michael Bryan
83354ab24b
Fixed up some unused-imports warnings
2017-06-25 14:21:23 +08:00
Michael Bryan
af05306046
Tried making sure travis installs all the musl tools when required
2017-06-25 14:11:43 +08:00
Michael Bryan
b796ee7c36
Made sure travis installs musl for the musl builds
2017-06-25 13:17:44 +08:00
Michal Budzynski
db94b3d839
Add minimal testing for the optional MathJax support
2017-06-25 00:39:57 +02:00
Michal Budzynski
f214c7108f
Make MathJax support optional
...
to enable add following to book.toml
```toml
[output.html]
mathjax-support = true
```
2017-06-25 00:32:33 +02:00
Michael Bryan
2abebfb244
Removed the default error-chain features
...
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
2017-06-25 00:40:56 +08:00
Michael Bryan
fd821a5ead
the binary now uses error-chain
2017-06-25 00:13:41 +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
0f93cd002b
Added error-chain to the config files
2017-06-24 23:53:08 +08:00
Michael Bryan
6761442241
Added error-chain to lib.rs
2017-06-24 23:48:50 +08:00
Mathieu David
b441066105
Merge pull request #335 from Michael-F-Bryan/refactor-hbs-renderer
...
Refactor hbs renderer
2017-06-24 14:44:12 +02:00
Mathieu David
d50486e337
Merge pull request #314 from budziq/fix_theme
...
Fixes missing the default "theme" dir location
2017-06-24 14:03:10 +02:00
Michael Bryan
c3dfabd5a2
Merge branch 'upstream/master' into refactor-hbs-renderer
...
Notably, this takes into account the curly-quotes pull request (#305 )
2017-06-24 16:07:01 +08:00
Michael Bryan
4c187bcb9f
Explained what HtmlHandlebars::write_custom_function() does
2017-06-24 15:50:51 +08:00
Michal Budzynski
d42ef1cdbc
reduced code repetition in `fill_from_tomlconfig`
2017-06-23 17:01:11 +02:00