mirror of
https://github.com/rust-lang/book.git
synced 2026-12-01 15:56:09 -06:00
563d52bcc570050065898ae0fd501d58b101f588
This kind of thing works now:
```markdown
> ## Something Big
>
> Here is the content!
```
The book does a lot of that (not just `> Note: …`). 😅
mdbook-simple-note-preprocessor
This is a very simple preprocessor for mdBook which takes Markdown like this—
> Note: This is some material we want to provide more emphasis for, because it
> is important in some way!
—and produces output roughly like this:
<section class="note" aria-label="Note" aria-role="note">
<p>
This is some material we want to provide more emphasis for, because it is
important in some way!
</p>
</section>
This allows using the relatively standard Markdown convention of (incorrectly!) using blockquotes for “callouts” or “notes” like this, while still producing semantic HTML which conveys the actual intent.
Note
This is not a full “admonition” preprocessor, and it is not remotely compliant with the GitHub “alert” syntax. It exists almost entirely for the sake of providing better semantic HTML for The Rust Programming Language book with a minimum of disruption to existing workflows!
You are probably better off using one of the other existing alert/admonition preprocessors:
Languages
Rust
88.6%
XSLT
5%
Shell
2.9%
HTML
2.2%
JavaScript
0.8%
Other
0.5%