Mathieu David
ef5895fa78
Update all dependencies
2017-09-11 19:38:10 +02:00
Mathieu David
84ef4d2617
preserve dashes when generating anchors and trim whitespace
2017-09-08 19:59:04 +02:00
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
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
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
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
projektir
16aa545c5b
Integrating Ace #247
2017-08-03 22:45:33 -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
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
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
b3c9ba4555
Correct clippy nits
2017-06-27 09:08:58 +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
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
487f5ce339
Added error-chain to the renderer module
2017-06-25 00:10:06 +08: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
Mathieu David
5e93decf6e
Merge pull request #328 from sunng87/feature/handlebars-upgrade
...
Update handlebars and some helpers
2017-06-23 11:16:52 +02:00
Mathieu David
28afebdca2
Merge branch 'minor_refactor' of https://github.com/budziq/mdBook into budziq-minor_refactor
2017-06-23 01:09:26 +02:00
Mathieu David
4128a78171
Merge branch 'master' of github.com:azerupi/mdBook
2017-06-23 00:50:11 +02:00
projektir
73160877b3
Creating markdown code from playpen files instead of HTML #345
2017-06-21 09:33:41 -04:00
Michael Bryan
33f3bec301
Cleaned up the filter_map for normalizing id's using a more readable procedural style
2017-06-20 11:23:53 +08:00
Michael Bryan
8c30de16d6
Used the Entry API to make id counter incrementing nicer
2017-06-20 11:15:12 +08:00
Michael Bryan
fa95546988
Broke the header link wrapping out into smaller functions
2017-06-20 11:06:30 +08:00
Michael Bryan
ac16d7aef1
Added some tests for the original build_header_links function
2017-06-20 10:54:32 +08:00
Michael Bryan
e2a7adaa79
Introduced a RenderItemContext to make item rendering easier
...
I also accidentally ran `rustfmt` instead of `rustfmt-nightly`, so there are a lot of unnecessary style changes :(
2017-06-20 08:54:39 +08:00
Michael Bryan
75f0196c55
Pulled index rendering out into its own method
2017-06-20 07:53:46 +08:00
Jimmy Do
193f014a5b
Add an option to convert to curly quotes when rendering to HTML
2017-06-18 10:11:04 -07:00
Michael Bryan
4af10ce60c
Renamed a couple functions to be more descriptive and ran rustfmt
2017-06-17 21:15:54 +08:00
Michael Bryan
deab3ba751
Tiny whitespace changes
2017-06-16 06:50:13 +08:00
Michael Bryan
b7aa78c3c0
Minor refactoring
2017-06-15 18:39:41 +08:00
Michael Bryan
2568986fd5
fixed a typo
2017-06-15 18:17:16 +08:00
Michael Bryan
f946ef6327
Pulled some more little bits out into their own helper functions
2017-06-15 18:03:10 +08:00
Michael Bryan
0d0deb7c40
Pulled page rendering out into its own method
2017-06-15 17:43:44 +08: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
Ning Sun
e890579141
(fix) some merge issue
2017-06-13 20:53:25 +08:00
Ning Sun
6ee6da074e
(refactor) rework helpers based on new handlebars api
...
Signed-off-by: Ning Sun <sunng@about.me>
2017-06-13 20:43:17 +08:00
Ning Sun
2bb274d424
Merge branch 'master' of github.com:azerupi/mdBook
2017-06-13 20:40:46 +08:00
Mathieu David
9ce6eebe43
Merge branch 'master' of git://github.com/Cldfire/mdBook into Cldfire-master
2017-06-12 11:19:31 +02:00
Mathieu David
350c86155b
Merge branch 'custom_js' of git://github.com/budziq/mdBook into budziq-custom_js
2017-06-12 11:09:07 +02:00
Michal Budzynski
08fd255a56
Move from localStorage to store.js (v2.0.3)
...
Fixes a lot of browser incompatibilities in localStorage/cookie handling
Including but not limited to:
- loss of styling and functionality on chromium private mode
- loss of styling and functionality on safari and safari private mode
- awaiting verification if problems in mobile safari are solved.
2017-06-12 01:53:25 +02:00
Michal Budzynski
f96e7e5cba
Implemented support for additional JS
2017-06-11 15:08:09 +02:00
Cldfire
44efc65c63
Add Ayu
theme
...
Also adds the a new variable, `$inline-code-color`, to base.styl. The `Ayu` theme needed this to change the text color of inline code.
2017-06-06 16:35:44 -04:00
Mathieu David
bb4ceb481f
Allow an additional custom stylesheets, closes #178
2017-06-04 20:41:31 +02:00
Mathieu David
2e812db13c
Fix for google-analytics
2017-06-04 20:41:31 +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