docs(reference): cover bare dice and tilde fences

Add the bare d-form (d20) to the dice notation table, and note that role fences accept backticks or tildes with hyphen-capable attribute keys. Regenerate both reference copies from known.ts and mirror the notes in the skill and markdown docs.
This commit is contained in:
hyper
2026-09-12 23:56:12 +08:00
parent 08bc97bec5
commit 322287da29
7 changed files with 29 additions and 3 deletions
+5
View File
@@ -11,6 +11,10 @@
- [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) - 标题 ID
- [marked-directive](https://github.com/fengzilong/marked-directive) - 指令语法
### 代码块围栏
代码块围栏可使用反引号或波浪号(`~~~`)书写;闭合围栏必须与开启围栏使用相同字符,且不短于开启围栏。声明 `role=` 的代码块同理。
## 指令语法
通过 `marked-directive` 支持自定义组件插入:
@@ -123,6 +127,7 @@
- 点击文本执行掷骰
- 点击骰子图标重置为公式
- `key` 属性将结果记录到 URL 参数中 (`?dice-attack=15`)
- 骰子数量可省略,`d20` 等价于 `1d20`
**属性:**
+5
View File
@@ -256,6 +256,10 @@ Renders a clickable span that dispatches a journal command.
The `role=` attribute on the info string determines how a fenced block is
handled.
Fences may use backticks or tildes (`~~~`); the closing fence must reuse
the opening marker. Fence attribute keys may contain hyphens (e.g.
`data-foo=bar`).
### `role=spark-table`
CSV (or markdown pipe table) rendered as `:md-table`.
@@ -339,6 +343,7 @@ Used by `:md-dice`, spark-table headers, and the journal `/roll`:
|---|---|
| `2d6` | two six-sided dice |
| `1d20+5` | d20 plus modifier |
| `d20` | one twenty-sided die (count optional) |
| `3d6kh1` | keep highest 1 |
| `3d6dl2-1` | drop lowest 2, minus 1 |
| `{d4, d8}` | choose one of the listed dice |