Docs & Text Formatting
These docs are built with VitePress 1.6.4 and extended with custom markdown-it plugins. This page is the living reference for every formatting feature you can use in these pages.
Headings, lists, links
Everything from CommonMark plus VitePress extras:
Ordered and unordered lists, nesting, task lists:
- [x] Write docs
- [ ] Release
Internal links, external links (open in a new tab)
Footnotes[^1]
[^1]: Footnote text rendered at the bottom of the page.
Tables
Tables are the workhorse of these docs — pipe tables with alignment:
| Hand rank | Beats | Frequency (7 cards) |
|---|---|---|
| Royal flush | Everything | 4 324 |
| Straight flush | Four of a kind | 37 260 |
| Four of a kind | Full house | 224 848 |
| Full house | Flush | 3 473 184 |
| Flush | Straight | 4 047 644 |
Inline text formatter
The custom markdown plugins add rich inline formatting:
| Markup | Renders as | Use it for |
|---|---|---|
==text== | highlighted (max) | Emphasizing a key term |
^^text^^ | underlined | Deprecation notes, terms |
**bold** | bold | Strong emphasis |
*italic* | italic | Emphasis |
`code` | inline code | API names, identifiers |
~~strike~~ | Removed content |
Example sentence: the engine's gameReducer is a pure function — call it with the same state and action and you always get the same next state, which makes undo, replay and testing trivial.
Callout containers
INFO
Non-critical context — e.g. where a feature applies.
TIP
Best practice that saves you from a common mistake.
WARNING
Something that can surprise you, like a behavioral rule change.
DANGER
Security-relevant guidance. Read before deploying.
Click to expand
A more detailed explanation.
Custom container titles
Why ante pots exist
Antes are collected as dead money and never count toward the live preflop wager, so the minimum raise stays big blind × 2 even with antes in play.
Code groups (tabs)
npm install @pokertools/enginepnpm add @pokertools/engineyarn add @pokertools/engineCode blocks
// TypeScript with syntax highlighting
import { PokerEngine } from "@pokertools/engine";
const engine = new PokerEngine({ smallBlind: 5, bigBlind: 10 });
console.log(engine.state.currentBets);// Solidity highlighting for contract snippets
contract BatchSweeper is Ownable {
function batchSweep(...) external onlyOwner {}
}TIP
Every code block has a copy button; language labels auto-detect or come from the language tag.
Formulas as plain text
Math rendering is intentionally not part of this site; formulas stay readable as code or plain text without an extra renderer:
- Pot odds:
call / (pot + call)→20 / (20 + 60) = 25% - Expected value:
EV = Σ (P_i × V_i)
Layout niceties
- Line highlighting in code blocks via
// [!code highlight] - Focus via
// [!code focus] - Diff via
// [!code ++]/// [!code --] - Emoji: 🃏 ⚡ 📚 🔌
Writing style
| Do | Don't |
|---|---|
| Use tables for API references and options | Write long prose lists |
| Show runnable examples for every public API | Reference APIs without examples |
Use == highlights sparingly | Highlight entire paragraphs |
| Link between package pages | Duplicate content across pages |
| Keep examples copy-pasteable | Use fictional IDs without a generation step |