GitHub Flavored
Wrap content in ~~ markers for strikethrough text.
| Factory | Aliases |
|---|
b.strikethrough() | b.strike(), b.st() |
b.strikethrough("removed")
b.paragraph("Price: ", b.st("$50"), " $30")
Create a checklist. Each item is a tuple of [checked, ...content].
| Factory | Aliases |
|---|
b.list.tasks() | — |
b.list.tasks(
[true, "Write documentation"],
[false, "Add tests"],
[true, "Ship it"],
)
- [x] Write documentation
- [ ] Add tests
- [x] Ship it
| Method | Description | Aliases |
|---|
.style("x" | "X") | Choose lowercase or uppercase check mark | — |
b.list.tasks(
[true, "Ship it"],
).style("X")
Task lists can be nested with other list types:
b.list.tasks(
[true, "Phase 1"],
b.list.unordered("Sub-item A", "Sub-item B"),
[false, "Phase 2"],
)
- [x] Phase 1
- Sub-item A
- Sub-item B
- [ ] Phase 2
Insert emoji using GitHub-style shortcodes. The shortname parameter accepts any of 300+ supported shortcodes and is fully type-safe with autocomplete.
| Factory | Aliases |
|---|
b.emoji(shortname) | b.e() |
GitHub-flavored blockquote alerts use the .alert() method on a blockquote block.
| Factory | Method |
|---|
b.blockquote() | .alert(type) |
b.blockquote("This is a helpful tip.").alert("tip")
> [!TIP]
> This is a helpful tip.
b.blockquote("Breaking change ahead.").alert("warning")
> [!WARNING]
> Breaking change ahead.
| Type | Description |
|---|
note | Highlights information the user should take note of |
tip | Optional advice to help the user succeed |
important | Key information the user needs to know |
warning | Urgent information requiring immediate attention |
caution | Potential negative consequences of an action |