This enables the smart-punctuation setting by default. The long term
plan is to continue to enable more markdown extensions by default across
semver breaking releases.
This adds `MarkdownOptions` for creating the pulldown-cmark parser, and
`HtmlRenderOptions` for converting markdown to HTML. These types should
help make it easier to extend the rendering options while remaining
semver compatible. It should also help with just general ergonomics of
using these functions.
This changes all HTML IDs so that they have the `mdbook-` prefix. This
should help avoid ID conflicts between internal IDs and IDs from user
content such as section headers.
This is a relatively disruptive change and has a high risk of breaking
something. However, I think I have covered everything, and if anything
is missed, hopefully it will get detected.
I did not change class names since the chance of a collision is much
smaller than with IDs. However, that is something that could be
considered in the future.
Closes https://github.com/rust-lang/mdBook/issues/880
This changes the `--dest-dir` flag so that it is relative to the current
directory, not the book root. This has been a source of confusion for
several people.
Fixes https://github.com/rust-lang/mdBook/issues/698
This removes the `--dest-dir` flag from the `mdbook test` subcommand
because it is unused. The test command does not generate output, so it
doesn't need an output directory.
These tests have been flaky, and in general it was probably unwise to
try to rely on an external site like this. I was unable to determine
exactly why the test is failing. The page loads, and then puppeteer
throws an error.
I don't know if it is really feasible to bring these back in some form.
It's probably more effort than it is worth.
Closes https://github.com/rust-lang/mdBook/issues/2765
There's a regression caused by recent refactor work, as it used to execute preprocessors/backends in a deterministic way, but now this is not the case, which causes trouble when some backends implicitly depend on the result from another backend and happen to work (e.g. mdbook-pdf). The root cause is that a HashMap has no order, so this PR switches this into `BTreeMap` instead.
Signed-off-by: Hollow Man <hollowman@opensuse.org>
This changes `with_renderer` and `with_preprocessor` to replace any
extensions of the same name instead of just appending to the list. This
is necessary for rust-lang's build process, because we replace the
preprocessors with local ones. Previously, mdbook would just print an
error, but continue working. With the change that preprocessors are no
longer optional by default, it is now required that we have a way to
replace the existing entries.
This changes the serialization so that `book.src` is not serialized if
it is the default. This removes the somewhat pointless `src = "src"`
which shows up in the default `mdbook init` output. Deserialization
should still default to `"src"`.
This adds the `optional` field to the preprocessor configuration to
mirror the same option for the `output` table. Missing preprocessors are
now an error unless the `optional` field is set. This should help with
inadvertently building a book when a missing preprocessor that you
expect to be installed.
This changes preprocessors so that:
- Relative paths in the `command` value are relative to the book root.
- The process current directory is the book root.
This makes it so that it isn't dependent on the directory where `mdbook`
is executed.
Fixes https://github.com/rust-lang/mdBook/issues/1424
This replaces the `{{#previous}}` and `{{#next}}` handelbars helpers
with simple objects that contain the previous and next values. These
helpers have been a bit fussy to work with and have caused issues in the
past. This drops a large amount of somewhat fragile code with something
that is a bit simpler.
Additionally, this switches the previous/next arrows to use an `{{#if}}`
instead CSS trickery which may help with upcoming changes to
font-awesome.
This removes the deprecated support for renderer paths that are relative
to the destination. Relative renderer command paths now must always be
relative to the book root.