docs(examples): make code-as-docs read as a cafe journal
Drop syntax-teaching asides, rename the tip helper to 印章加一, and keep return phrasing that the italic heuristic recognizes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4a1c9c48a2
commit
5058f5ddcf
2 files changed
+18
-33
No files matched your search
@@ -1,22 +1,7 @@
|
||||
# 代码即文档 · 周末咖啡手账
|
||||
|
||||
可读可跑的 v0.3 样例:`.mq.md` 同时是说明文和程序。
|
||||
|
||||
```bash
|
||||
marqdo run examples/code-as-docs/index.mq.md
|
||||
```
|
||||
|
||||
## 这份样例在示范什么
|
||||
|
||||
| 习惯 | 写法 |
|
||||
|------|------|
|
||||
| 数据给人读 | GFM 表当菜单 / 订单 |
|
||||
| 步骤嵌在句子里 | `**总额 = 价 * 杯数**`、返回 `*总额*` |
|
||||
| 装饰性强调 | `**说明**` 不执行 |
|
||||
| 段落分隔 | `---` 只是分割线 |
|
||||
| 浮点 | `折扣`=0.85 |
|
||||
| 取元 | `[拿铁](菜单)` / `` [`名`](菜单) ``(与循环同形;脚注 `[^…]` 仅过渡) |
|
||||
| 循环 | `- [行](今日订单)` |
|
||||
| 调用 | `**摘要 = 结账摘要 …**`(粗体 RHS 可省略 `>`) |
|
||||
|
||||
设计:[collection-access-link.md](../../doc/design/collection-access-link.md)、[code-as-docs-gaps.md](../../doc/design/code-as-docs-gaps.md)。
|
||||
菜单与订单是表,计价嵌在段落里,结账像写日记。取元用 `[键](集合)`,循环用 `- [行](订单)`,与 [collection-access-link.md](../../doc/design/collection-access-link.md) 一致。
|
||||
Reference in new issue
Block a user