-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support block quote tags e.g. [!NOTE]
- Loading branch information
1 parent
f84e3af
commit 4e7f4dc
Showing
8 changed files
with
108 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
use indoc::indoc; | ||
|
||
use super::{Chapter, Config, MDBook}; | ||
|
||
#[test] | ||
fn alerts() { | ||
let alert = indoc! {" | ||
> [!NOTE] | ||
> Highlights information that users should take into account, even when skimming. | ||
"}; | ||
let latex = MDBook::init() | ||
.chapter(Chapter::new("", alert, "chapter.md")) | ||
.config(Config::latex()) | ||
.build(); | ||
insta::assert_snapshot!(latex, @r#" | ||
├─ log output | ||
│ INFO mdbook::book: Running the pandoc backend | ||
│ INFO mdbook_pandoc::pandoc::renderer: Running pandoc | ||
│ INFO mdbook_pandoc::pandoc::renderer: Wrote output to book/latex/output.tex | ||
├─ latex/output.tex | ||
│ Note | ||
│ | ||
│ Highlights information that users should take into account, even when skimming. | ||
├─ latex/src/chapter.md | ||
│ [Div ("", ["note"], []) [Div ("", ["title"], []) [Para [Str "Note"]], Para [Str "Highlights information that users should take into account, even when skimming."]]] | ||
"#); | ||
let markdown = MDBook::init() | ||
.chapter(Chapter::new("", alert, "chapter.md")) | ||
.config(Config::markdown()) | ||
.build(); | ||
insta::assert_snapshot!(markdown, @r" | ||
├─ log output | ||
│ INFO mdbook::book: Running the pandoc backend | ||
│ INFO mdbook_pandoc::pandoc::renderer: Running pandoc | ||
│ INFO mdbook_pandoc::pandoc::renderer: Wrote output to book/markdown/book.md | ||
├─ markdown/book.md | ||
│ > [!NOTE] | ||
│ > Highlights information that users should take into account, even when skimming. | ||
"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters