No description
Find a file
Travis Cross 49f9c9741e Remove italics from ayu quotes/comments for alignment
Comments in code examples often rely on exact column alignment,
e.g. for ASCII-art.  This alignment often relies on both code and
comment characters having exactly the same width.

Setting `font-style: italic` seems to break these invariants with
common monospace fonts used by browsers.  This may be due to font
synthesis when the monospace font does not have a native italic
variant.

E.g., see these code examples when using the `ayu` theme:

- https://doc.rust-lang.org/1.90.0/reference/types/closure.html#r-type.closure.drop-order
- https://doc.rust-lang.org/1.90.0/reference/types/impl-trait.html#r-type.impl-trait.generic-capture.precise.use

It seems more important to have correct alignment than to style these
elements in italics, so let's drop the italic styling.

One alternative would be to set `font-synthesis: none` instead.  This
would prevent font synthesis-related misalignment while still
rendering italics when a font supports italics natively.  This might
correct the alignment issue, but ASCII-art in comments often wants
vertical bars to actually be vertical, so it still seems better to
just turn off italics entirely.

A more minimal change might be to only drop this from comments and not
from `hljs-quote`, but it seems the styling for these classes are
usually kept in sync, so we preserve that here.
2025-10-27 20:26:04 +00:00
.cargo Add an xtask to help with running tests 2025-09-26 18:55:21 -07:00
.github Merge pull request #2870 from rust-lang/renovate/actions-checkout-5.x 2025-09-28 16:46:48 +00:00
ci Add job to automatically update dependencies 2025-09-24 16:05:14 -07:00
crates Remove italics from ayu quotes/comments for alignment 2025-10-27 20:26:04 +00:00
examples Set up new workspace publish workflow 2025-09-26 17:40:34 -07:00
guide Add link to output.html.definition-lists 2025-09-18 20:20:25 -07:00
src Move get_404_output_file to HtmlConfig 2025-09-19 18:11:29 -07:00
tests Merge pull request #2899 from ehuss/filtered-headings 2025-10-22 00:24:37 +00:00
.git-blame-ignore-revs Add more rustfmt commits to git blame ignore 2025-10-20 13:31:03 -07:00
.gitattributes Mark more font files as binary 2025-04-05 20:41:36 -04:00
.gitignore Support multiple books in the GUI tests 2025-10-15 07:00:33 -07:00
Cargo.lock Update to 0.5.0-beta.1 2025-10-26 12:55:06 -07:00
Cargo.toml Update to 0.5.0-beta.1 2025-10-26 12:55:06 -07:00
CHANGELOG.md Update to 0.5.0-beta.1 2025-10-26 12:55:06 -07:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Add a syntax-highlighting GUI test 2025-10-15 07:00:35 -07:00
eslint.config.mjs Lint HBS JS templates 2025-08-25 15:15:47 -07:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
package.json Update dependency browser-ui-test to v0.22.2 2025-09-28 16:17:11 +00:00
README.md README.md: update workflow status badge 2025-02-13 11:01:08 -05:00
rustfmt.toml Add rustfmt.toml 2025-07-23 17:29:55 -07:00
triagebot.toml Add triagebot range-diff feature 2025-09-24 17:00:52 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.