Mathieu David
016ec8836c
Merge pull request #415 from azerupi/fix-print-title
...
Fix the print title that was using the title from the last rendered chapter
2017-09-07 23:29:54 +02:00
Mathieu David
881a1b39ff
Remove the logic in handlebars and expose the 3 different titles in the handlebars variables
2017-09-07 23:19:22 +02:00
Mathieu David
a1e58229b2
Merge pull request #418 from behnam/manifest
...
[Cargo.toml] Fix package.exclude warnings
2017-09-07 22:46:49 +02:00
Mathieu David
276eab095c
Merge pull request #427 from budziq/spurious_reloads
...
Do not trigger spurious watch events on Write and Remove
2017-09-07 22:45:12 +02:00
Michal Budzynski
570ce6681f
Do not trigger spurious watch events on Write and Remove
2017-09-06 22:33:56 +02:00
Behnam Esfahbod
ddee839d9c
[renderer] Err on bad file names, instead of panic
...
Addressing the review comments.
2017-09-06 02:25:10 -07:00
Behnam Esfahbod
99945542ca
[renderer] Add normalize_path()
...
On the web, the normalized path separator is forward-slash (`/`), so we
use the built-in `is_separator()` method to replace any path separator
with the forward-slash, to ensure consistent output on unix and windows
machines.
2017-09-06 00:52:17 -07:00
Behnam Esfahbod
956a5cc7fd
Fix heading links in nested pages
...
Plus fixing the whitespace chars not being replaced by hyphen.
Also expand tests for link creations, and add test for nested pages.
Fixes <https://github.com/azerupi/mdBook/issues/416 >
Fixes <https://github.com/azerupi/mdBook/issues/417 >
2017-09-06 00:52:17 -07:00
Behnam Esfahbod
cef62ec42e
Fix build and test warnings
...
Move non-test test module files into their own directories to prevent
cargo from running them as tests. Then suppress the left-over warnings.
Move *dummy book* code and data into a shared folder, and leave the rest
of helper utilities (one function) in the original module.
2017-09-06 00:52:17 -07:00
Behnam Esfahbod
b1362bfa06
[watch] Fix build warnings
2017-09-06 00:52:15 -07:00
Michal Budzynski
6bc3039b4f
Both static and ACE editable snippets have optional play button
...
- list of available crates is dynamically loaded from play.rust-lang.org
- play button is enabled only if crates used in snippet are available on playground
- ACE editor's play button is dynamically updated on each text change
- `no_run` is honored by always disabling the play button
- minor cleanups
2017-09-06 00:18:24 +02:00
Michal Budzynski
cd90fdd407
first prototype of play-button enabling only if crate list supported
...
also minor refactor of clipboard handling
TODO:
- `no_run` support
- test with ACE
- disable play button with tooltip instead of hiding
2017-09-06 00:18:24 +02:00
Mathieu David
0a4a2b66da
Fix the print title that was using the title from the last rendered chapter. Fixes #414
2017-09-01 08:22:24 +02:00
Behnam Esfahbod
40a4840867
[book] Prevent over-matching in gitignore rule
...
To only ignore the output destination (default: `book`) and no other
file/directory with the same name under the mdbook root, we should
prefix the gitignore rule with a leading slash (default: `/book`).
2017-08-30 16:01:45 -07:00
Michal Budzynski
31983cae6c
fixed missing playpen css class when codeblock properties had whitespace
2017-08-11 12:39:27 +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
Michal Budzynski
c36eca15c2
renamed `Playpen` to `Playground` in ajax error handling
2017-08-06 17:10:52 +02:00
Michal Budzynski
eed1a0a591
handle play.rust-lang.org communication errors in playpens
...
also add 15s communication timeout
2017-08-06 14:59:19 +02:00
projektir
16aa545c5b
Integrating Ace #247
2017-08-03 22:45:33 -04:00
projektir
6601dbdd61
Adding ace.js, Rust highlighter, and themes #247
2017-08-03 20:00:39 -04:00
Mathieu David
373e36ebfb
Merge pull request #380 from ffissore/master
...
Fixed wrong filename when post processing html
2017-08-03 16:27:18 +02:00
Michael Bryan
2f8d5ce263
Removed a lot of the repetition in Theme::new()
2017-08-03 07:01:52 +08:00
Michael Bryan
ce2d7153f7
removed some repetition from the themes module
2017-08-02 23:31:37 +08:00
Michal Budzynski
ee29b9d5f6
added clone derives and made the separating space mandatory in links with paths
2017-08-01 13:50:12 +02: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
Federico Fissore
07b80723b6
Fixed wrong filename when post processing html
2017-07-24 11:37:31 +02:00
Mathieu David
55e7e82e5c
Merge pull request #340 from messense/feature/mdbook-test-library-path
...
Add library path argument for `mdbook test`
2017-07-08 23:27:28 +02:00
Michal Budzynski
287f539b7d
Increased default logging level to info unless RUST_LOG is set
2017-06-28 23:37:03 +02:00
messense
7c023e2d1d
Add library path argument for `mdbook test`
2017-06-28 10:33:52 +08:00
messense
f2544e0707
Print stdout when `mdbook test` failed
2017-06-28 10:28:50 +08: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
Michal Budzynski
5e088d92c9
Merge remote-tracking branch 'upstream/master' into split_commands
2017-06-27 13:06:19 +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
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
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
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