Skip to content

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.

Everything from CommonMark plus VitePress extras:

[^1]: Footnote text rendered at the bottom of the page.

Tables ​

Tables are the workhorse of these docs — pipe tables with alignment:

Hand rankBeatsFrequency (7 cards)
Royal flushEverything4 324
Straight flushFour of a kind37 260
Four of a kindFull house224 848
Full houseFlush3 473 184
FlushStraight4 047 644

Inline text formatter ​

The custom markdown plugins add rich inline formatting:

MarkupRenders asUse it for
==text==highlighted (max)Emphasizing a key term
^^text^^underlinedDeprecation notes, terms
**bold**boldStrong emphasis
*italic*italicEmphasis
`code`inline codeAPI names, identifiers
~~strike~~strikeRemoved 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) ​

ts
npm install @pokertools/engine
ts
pnpm add @pokertools/engine
ts
yarn add @pokertools/engine

Code blocks ​

ts
// TypeScript with syntax highlighting
import { PokerEngine } from "@pokertools/engine";

const engine = new PokerEngine({ smallBlind: 5, bigBlind: 10 });
console.log(engine.state.currentBets);
solidity
// 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 ​

DoDon't
Use tables for API references and optionsWrite long prose lists
Show runnable examples for every public APIReference APIs without examples
Use == highlights sparinglyHighlight entire paragraphs
Link between package pagesDuplicate content across pages
Keep examples copy-pasteableUse fictional IDs without a generation step

Released under the MIT License.