Parsing demos powered by lib/net: cookie_parse and multipart_parse.
|
| Cookie request
|
-| `req_cookie`[^name]=`req_cookie`[^value] |
+| [name](`req_cookie`)=[value](`req_cookie`) |
|
Set-Cookie response
|
-| `resp_cookie`[^name]=`resp_cookie`[^value] · HttpOnly=`resp_cookie`[^http_only] |
+| [name](`resp_cookie`)=[value](`resp_cookie`) · HttpOnly=[http_only](`resp_cookie`) |
|
Multipart field
|
-| `mp_title`[^name]=`mp_title`[^value] |
+| [name](`mp_title`)=[value](`mp_title`) |
|
Multipart file
|
-| `mp_cover`[^name] · `mp_cover`[^filename] · `mp_cover`[^content_type] |
+| [name](`mp_cover`) · [filename](`mp_cover`) · [content_type](`mp_cover`) |
|
|
**tools_intro = > text.str_join xs=`tools_parts` sep=""**
diff --git a/public/structure/06-collection.mq.md b/public/structure/06-collection.mq.md
index 1cc9df5..2386ecd 100644
--- a/public/structure/06-collection.mq.md
+++ b/public/structure/06-collection.mq.md
@@ -5,7 +5,7 @@ description: One-column tables are lists
# main
-A single-column Markdown table is a list; loop to read each item. Use `basket`[^1] for 1-based index.
+A single-column Markdown table is a list; loop to read each item. Prefer link-index get `[1](basket)` (1-based).
`basket` =
diff --git a/public/structure/06-集合.mq.md b/public/structure/06-集合.mq.md
index 0f93c33..7b858b0 100644
--- a/public/structure/06-集合.mq.md
+++ b/public/structure/06-集合.mq.md
@@ -5,7 +5,7 @@ description: 单列竖表即列表
# main
-单列 Markdown 表是列表;用循环读每一项。按下标用 `` `篮子`[^1] ``(1-based)。
+单列 Markdown 表是列表;用循环读每一项。按下标优先用链接取元 `[1](篮子)`(1-based)。
`篮子` =
diff --git a/public/structure/07-map.mq.md b/public/structure/07-map.mq.md
index a67e4bb..7afdcb6 100644
--- a/public/structure/07-map.mq.md
+++ b/public/structure/07-map.mq.md
@@ -1,11 +1,11 @@
---
title: Maps (horizontal tables)
-description: Multi-column tables are maps; footnote gets
+description: Multi-column tables are maps; link-index get
---
# main
-A multi-column table with one data row is a map. Read values with footnote keys.
+A multi-column table with one data row is a map. Read values with `[key](map)`.
`kinds` =
@@ -13,10 +13,10 @@ A multi-column table with one data row is a map. Read values with footnote keys.
|-------|----------|
| fruit | vegetable |
-**`k` = `kinds`[^apple] **
+**`k` = [apple](kinds)**
> print text=`k`
-**`k` = `kinds`[^cucumber] **
+**`k` = [cucumber](kinds)**
> print text=`k`
diff --git a/public/structure/07-字典.mq.md b/public/structure/07-字典.mq.md
index e5e079b..bab186f 100644
--- a/public/structure/07-字典.mq.md
+++ b/public/structure/07-字典.mq.md
@@ -1,11 +1,11 @@
---
title: 字典(横表)
-description: 多列表是字典;脚注按键取元
+description: 多列表是字典;链接取元
---
# main
-多列且仅一行数据的表是字典。用脚注键取元。
+多列且仅一行数据的表是字典。用 `[键](字典)` 取元。
`分类` =
@@ -13,10 +13,10 @@ description: 多列表是字典;脚注按键取元
|------|------|
| 水果 | 蔬菜 |
-**`种` = `分类`[^苹果] **
+**`种` = [苹果](分类)**
> 打印 内容=`种`
-**`种` = `分类`[^黄瓜] **
+**`种` = [黄瓜](分类)**
> 打印 内容=`种`
diff --git a/public/structure/08-records.mq.md b/public/structure/08-records.mq.md
index 997beaf..b677295 100644
--- a/public/structure/08-records.mq.md
+++ b/public/structure/08-records.mq.md
@@ -5,7 +5,7 @@ description: First header @ / row makes a list of maps
# main
-When the first header is `@` or `row`, each data row is a map (marker column is not a field).
+When the first header is `@` or `row`, each data row is a map (marker column is not a field). Nested get: `[field]([1](orders))`.
`orders` =
@@ -14,10 +14,10 @@ When the first header is `@` or `row`, each data row is a map (marker column is
| 1 | apple | 2 |
| 2 | pear | 3 |
-**`n` = `orders`[^1][^name] **
+**`n` = [name]([1](orders))**
> print text=`n`
-**`q` = `orders`[^2][^qty] **
+**`q` = [qty]([2](orders))**
> print text=`q`
diff --git a/public/structure/08-记录表.mq.md b/public/structure/08-记录表.mq.md
index c46badc..7bcd33e 100644
--- a/public/structure/08-记录表.mq.md
+++ b/public/structure/08-记录表.mq.md
@@ -5,7 +5,7 @@ description: 首列表头「行」→ 每行一个字典
# main
-首列表头为 `行`(或 `@` / `row`)时,每行数据是一个字典;标记列不进入字段。
+首列表头为 `行`(或 `@` / `row`)时,每行数据是一个字典;标记列不进入字段。嵌套取元:`[字段]([1](订单))`。
`订单` =
@@ -14,10 +14,10 @@ description: 首列表头「行」→ 每行一个字典
| 1 | 苹果 | 2 |
| 2 | 梨 | 3 |
-**`名` = `订单`[^1][^品名] **
+**`名` = [品名]([1](订单))**
> 打印 内容=`名`
-**`量` = `订单`[^2][^数量] **
+**`量` = [数量]([2](订单))**
> 打印 内容=`量`
diff --git a/tests/ext/:memory: b/tests/ext/:memory:
new file mode 100644
index 0000000..20c5855
Binary files /dev/null and b/tests/ext/:memory: differ
diff --git a/tests/ext/agent-mcp-server-smoke.mq.md b/tests/ext/agent-mcp-server-smoke.mq.md
index 0bf801c..d85e94c 100644
--- a/tests/ext/agent-mcp-server-smoke.mq.md
+++ b/tests/ext/agent-mcp-server-smoke.mq.md
@@ -17,15 +17,15 @@ import demo:agent-mcp-server-helpers.mq.md
**srv = > agent.mcp_server name="marqdo-test"**
**srv = > `srv`.tool name="ping" fn="demo.ping" description="ping tool"**
-**tools = srv[^tools]**
+**tools = [tools](srv)**
**n = > len value=`tools`**
1. `n` == 1
> print text=mcp-tool-ok
2. *
> print text=mcp-tool-fail
-**t0 = tools[^1]**
-**fn = t0[^fn]**
+**t0 = [1](tools)**
+**fn = [fn](t0)**
1. `fn` == "demo.ping"
> print text=mcp-fn-ok
2. *
diff --git a/tests/ext/linalg-basic-smoke.mq.md b/tests/ext/linalg-basic-smoke.mq.md
index d3bd2ac..112ebdb 100644
--- a/tests/ext/linalg-basic-smoke.mq.md
+++ b/tests/ext/linalg-basic-smoke.mq.md
@@ -38,8 +38,8 @@ $$
> print text=trace-fail
**`sol` = > la.solve a=`A` b=`b`**
-**`x` = sol[^x]**
-**`data` = x[^data]**
+**`x` = [x](sol)**
+**`data` = [data](x)**
**`row0` = > at value=`data` index=0**
**`x0` = > at value=`row0` index=0**
**`e0` = > math.sub a=`x0` b=2**
@@ -52,7 +52,7 @@ $$
**`I` = > la.eye n=2**
**`P` = > la.mul a=`A` b=`I`**
**`E` = > la.explicit expr=`P`**
-**`ed` = E[^data]**
+**`ed` = [data](E)**
**`ed0` = > at value=`ed` index=0**
**`ed00` = > at value=`ed0` index=0**
**`ee` = > math.sub a=`ed00` b=2**
diff --git a/tests/ext/linalg-block-kron.mq.md b/tests/ext/linalg-block-kron.mq.md
index 76dc6c7..4c503d6 100644
--- a/tests/ext/linalg-block-kron.mq.md
+++ b/tests/ext/linalg-block-kron.mq.md
@@ -42,7 +42,7 @@ import la:ext/linalg/linalg.mq.md
> print text=`ct`
**`ping` = > la.ping**
-**`ok` = ping[^ok]**
+**`ok` = [ok](ping)**
1. `ok`
> print text=ping-ok
2. *
diff --git a/tests/ext/linalg-doc-smoke.mq.md b/tests/ext/linalg-doc-smoke.mq.md
index 25756bc..3433961 100644
--- a/tests/ext/linalg-doc-smoke.mq.md
+++ b/tests/ext/linalg-doc-smoke.mq.md
@@ -28,8 +28,8 @@ Narration: \((AB)^\top = B^\top A^\top\). The identity is checked by running thi
| 2 | Y | 2 | 2 |
**`env` = > la.declare table=`shapes`**
-**`X` = env[^X]**
-**`Y` = env[^Y]**
+**`X` = [X](env)**
+**`Y` = [Y](env)**
**`S` = `X` + `Y`**
**`st` = > la.ascii expr=`S`**
1. `st` == "X + Y"
diff --git a/tests/ext/linalg-factor-smoke.mq.md b/tests/ext/linalg-factor-smoke.mq.md
index d7e8f33..73b7768 100644
--- a/tests/ext/linalg-factor-smoke.mq.md
+++ b/tests/ext/linalg-factor-smoke.mq.md
@@ -16,13 +16,13 @@ $$
**`eps` = > math.div a=1 b=1000**
**`f` = > la.factorize matrix=`M` kind="eig"**
-**`kind` = f[^kind]**
+**`kind` = [kind](f)**
1. `kind` == eig
> print text=eig-kind-ok
2. *
> print text=eig-kind-fail
-**`evals` = f[^eigenvalues]**
+**`evals` = [eigenvalues](f)**
**`ev0` = > at value=`evals` index=0**
**`e0` = > math.sub a=`ev0` b=3**
**`e0` = > math.abs value=`e0`**
@@ -32,13 +32,13 @@ $$
> print text=eig-val-fail
**`img` = > la.draw factor=`f` kind="eig" path="linalg-factor-eig.svg"**
-**`ik` = img[^kind]**
+**`ik` = [kind](img)**
1. `ik` == eig
> print text=draw-kind-ok
2. *
> print text=draw-kind-fail
-**`svg` = img[^svg]**
+**`svg` = [svg](img)**
**`parts` = > split value=`svg` sep="data-linalg=\"eig\""**
**`pn` = > len value=`parts`**
1. `pn` > 1
@@ -60,8 +60,8 @@ $$
**`b` = > la.from_formula formula=`b`**
**`lu` = > la.factorize matrix=`A` kind="lu"**
**`sol` = > la.solve factor=`lu` b=`b`**
-**`x` = sol[^x]**
-**`data` = x[^data]**
+**`x` = [x](sol)**
+**`data` = [data](x)**
**`row0` = > at value=`data` index=0**
**`x0` = > at value=`row0` index=0**
**`xe` = > math.sub a=`x0` b=2**
@@ -72,7 +72,7 @@ $$
> print text=lu-solve-fail
**`svd` = > la.factorize matrix=`M` kind="svd"**
-**`sk` = svd[^ascii]**
+**`sk` = [ascii](svd)**
1. `sk` == SVD
> print text=svd-ok
2. *
diff --git a/tests/ext/linalg-formula-smoke.mq.md b/tests/ext/linalg-formula-smoke.mq.md
index adb4873..0038776 100644
--- a/tests/ext/linalg-formula-smoke.mq.md
+++ b/tests/ext/linalg-formula-smoke.mq.md
@@ -15,7 +15,7 @@ import la:ext/linalg/linalg.mq.md
> print text=`txt`
**`ping` = > la.ping**
-**`ok` = ping[^ok]**
+**`ok` = [ok](ping)**
1. `ok`
> print text=ping-ok
2. *
diff --git a/tests/ext/linalg-infix-smoke.mq.md b/tests/ext/linalg-infix-smoke.mq.md
index 39f10fc..3e099d4 100644
--- a/tests/ext/linalg-infix-smoke.mq.md
+++ b/tests/ext/linalg-infix-smoke.mq.md
@@ -17,7 +17,7 @@ import la:ext/linalg/linalg.mq.md
**`st` = > `Pt`.ascii**
> print text=`st`
-**`ty` = C[^_type]**
+**`ty` = [_type](C)**
1. `ty` == matrix
> print text=type-ok
2. *
@@ -35,7 +35,7 @@ $$
**`S` = `M` + `N`**
**`Se` = > la.explicit expr=`S`**
-**`d` = Se[^data]**
+**`d` = [data](Se)**
**`r0` = > at value=`d` index=0**
**`x00` = > at value=`r0` index=0**
**`xs` = > str value=`x00`**
diff --git a/tests/ext/linalg-metrics-smoke.mq.md b/tests/ext/linalg-metrics-smoke.mq.md
index 261e0e3..1b3e9bb 100644
--- a/tests/ext/linalg-metrics-smoke.mq.md
+++ b/tests/ext/linalg-metrics-smoke.mq.md
@@ -23,8 +23,8 @@ $$
**`eps` = > math.div a=1 b=1000**
**`ls` = > la.lstsq a=`A` b=`b`**
-**`x` = ls[^x]**
-**`xd` = x[^data]**
+**`x` = [x](ls)**
+**`xd` = [data](x)**
**`r0` = > at value=`xd` index=0**
**`x0` = > at value=`r0` index=0**
**`e0` = > math.sub a=`x0` b=1.1666666667**
@@ -49,7 +49,7 @@ $$
**`D` = > la.from_formula formula=`D`**
**`c` = > la.cond expr=`D`**
-**`cv` = c[^value]**
+**`cv` = [value](c)**
**`ce` = > math.sub a=`cv` b=2**
**`ce` = > math.abs value=`ce`**
1. `ce` < `eps`
@@ -65,7 +65,7 @@ $$
**`raw` = > json.parse text="[[[0,1],[1,0]],[[1,0],[0,-1]]]"**
**`Z` = > la.from_list data=`raw`**
-**`dt` = Z[^dtype]**
+**`dt` = [dtype](Z)**
1. `dt` == complex
> print text=complex-dtype-ok
2. *
@@ -80,13 +80,13 @@ $$
> print text=complex-norm-fail
**`img` = > la.draw factor=`D` kind="heatmap" theme="dark" path="linalg-metrics-heat.svg"**
-**`th` = img[^theme]**
+**`th` = [theme](img)**
1. `th` == dark
> print text=theme-ok
2. *
> print text=theme-fail
-**`svg` = img[^svg]**
+**`svg` = [svg](img)**
**`parts` = > split value=`svg` sep="data-theme=\"dark\""**
**`pn` = > len value=`parts`**
1. `pn` > 1
diff --git a/tests/ext/linalg-zh-smoke.mq.md b/tests/ext/linalg-zh-smoke.mq.md
index 0c5d95e..f132685 100644
--- a/tests/ext/linalg-zh-smoke.mq.md
+++ b/tests/ext/linalg-zh-smoke.mq.md
@@ -15,7 +15,7 @@ import la:ext/linalg/线性代数.mq.md
> 打印 内容=`txt`
**`ping` = > la.探测**
-**`ok` = ping[^ok]**
+**`ok` = [ok](ping)**
1. `ok`
> 打印 内容=探测-ok
2. *
diff --git a/tests/ext/llm-ctor-offline.mq.md b/tests/ext/llm-ctor-offline.mq.md
index 43ca66b..5c1df6a 100644
--- a/tests/ext/llm-ctor-offline.mq.md
+++ b/tests/ext/llm-ctor-offline.mq.md
@@ -7,5 +7,5 @@ import llm:ext/ai/llm.mq.md
# main
**model = > llm.llm**
-> print text=`model`[^model]
-> print text=`model`[^suffix]
+> print text=[model](`model`)
+> print text=[suffix](`model`)
diff --git a/tests/ext/quantum-amp-damp-smoke.mq.md b/tests/ext/quantum-amp-damp-smoke.mq.md
index 6d04ff8..29acc56 100644
--- a/tests/ext/quantum-amp-damp-smoke.mq.md
+++ b/tests/ext/quantum-amp-damp-smoke.mq.md
@@ -10,7 +10,7 @@ import quantum:ext/quantum/quantum.mq.md
**qc = > `qc`.x qubit=0**
**qc = > `qc`.noise kind="amplitude_damping" p=1**
**r = > `qc`.run shots=32 seed=7**
-**c0 = r[^counts][^0]**
+**c0 = [0]([counts](r))**
1. `c0` == 32
> print text=amp-ok
diff --git a/tests/ext/quantum-amp-damp-zh-smoke.mq.md b/tests/ext/quantum-amp-damp-zh-smoke.mq.md
index 34eedb4..8f577f9 100644
--- a/tests/ext/quantum-amp-damp-zh-smoke.mq.md
+++ b/tests/ext/quantum-amp-damp-zh-smoke.mq.md
@@ -10,7 +10,7 @@ description: 泡利X 后 振幅阻尼 p=1 全部落回 |0⟩.
**qc = > `qc`.泡利X 比特=0**
**qc = > `qc`.噪声 种类="振幅阻尼" 概率=1**
**r = > `qc`.运行 次数=32 种子=7**
-**c0 = r[^counts][^0]**
+**c0 = [0]([counts](r))**
1. `c0` == 32
> print text=amp-ok
diff --git a/tests/ext/quantum-author-api-smoke.mq.md b/tests/ext/quantum-author-api-smoke.mq.md
index b23549d..8424c57 100644
--- a/tests/ext/quantum-author-api-smoke.mq.md
+++ b/tests/ext/quantum-author-api-smoke.mq.md
@@ -13,14 +13,14 @@ import quantum:ext/quantum/quantum.mq.md
**qc = > `qc`.measure**
**st = > `qc`.state**
-**dim = st[^dim]**
+**dim = [dim](st)**
1. `dim` == 4
> print text=state-ok
2. *
> print text=state-fail
**img = > `qc`.draw path="quantum-author-draw.svg"**
-**kind = img[^kind]**
+**kind = [kind](img)**
1. `kind` == circuit
> print text=draw-ok
2. *
@@ -29,7 +29,7 @@ import quantum:ext/quantum/quantum.mq.md
**other = > quantum.circuit qubits=2**
**other = > `other`.x qubit=1**
**qc2 = > `qc`.append op=`other`**
-**ops = qc2[^ops]**
+**ops = [ops](qc2)**
**n = > len `ops`**
1. `n` == 5
> print text=append-ok
diff --git a/tests/ext/quantum-author-api-zh-smoke.mq.md b/tests/ext/quantum-author-api-zh-smoke.mq.md
index efec3ca..1b7057e 100644
--- a/tests/ext/quantum-author-api-zh-smoke.mq.md
+++ b/tests/ext/quantum-author-api-zh-smoke.mq.md
@@ -13,14 +13,14 @@ description: 屏障 / 测量 / 追加 / 态 / 绘图.
**qc = > `qc`.测量**
**st = > `qc`.态**
-**dim = st[^dim]**
+**dim = [dim](st)**
1. `dim` == 4
> print text=state-ok
2. *
> print text=state-fail
**img = > `qc`.绘图 路径="quantum-author-zh-draw.svg"**
-**kind = img[^kind]**
+**kind = [kind](img)**
1. `kind` == circuit
> print text=draw-ok
2. *
@@ -29,7 +29,7 @@ description: 屏障 / 测量 / 追加 / 态 / 绘图.
**other = > 量子.电路 比特数=2**
**other = > `other`.泡利X 比特=1**
**qc2 = > `qc`.追加 操作=`other`**
-**ops = qc2[^ops]**
+**ops = [ops](qc2)**
**n = > len `ops`**
1. `n` == 5
> print text=append-ok
diff --git a/tests/ext/quantum-bell-smoke.mq.md b/tests/ext/quantum-bell-smoke.mq.md
index 769c042..50ad492 100644
--- a/tests/ext/quantum-bell-smoke.mq.md
+++ b/tests/ext/quantum-bell-smoke.mq.md
@@ -12,8 +12,8 @@ import math:lib/math.mq.md
**qc = > `qc`.cx control=0 target=1**
**p = > `qc`.probabilities**
-**p00 = p[^00]**
-**p11 = p[^11]**
+**p00 = [00](p)**
+**p11 = [11](p)**
**lo = > math.div a=2 b=5**
**hi = > math.div a=3 b=5**
@@ -34,7 +34,7 @@ import math:lib/math.mq.md
> print text=p11-fail
**ping = > quantum_ping**
-**ok = ping[^ok]**
+**ok = [ok](ping)**
1. `ok`
> print text=ping-ok
2. *
diff --git a/tests/ext/quantum-custom-gate-smoke.mq.md b/tests/ext/quantum-custom-gate-smoke.mq.md
index 52acb1c..78f03be 100644
--- a/tests/ext/quantum-custom-gate-smoke.mq.md
+++ b/tests/ext/quantum-custom-gate-smoke.mq.md
@@ -16,7 +16,7 @@ $$
**qc = > quantum.circuit qubits=1**
**qc = > `qc`.apply gate=`U` qubits=0**
**p = > `qc`.probabilities**
-**p0 = p[^0]**
+**p0 = [0](p)**
**lo = > math.div a=4 b=10**
**hi = > math.div a=6 b=10**
diff --git a/tests/ext/quantum-custom-gate-zh-smoke.mq.md b/tests/ext/quantum-custom-gate-zh-smoke.mq.md
index 8413b31..552b2b8 100644
--- a/tests/ext/quantum-custom-gate-zh-smoke.mq.md
+++ b/tests/ext/quantum-custom-gate-zh-smoke.mq.md
@@ -16,7 +16,7 @@ $$
**qc = > 量子.电路 比特数=1**
**qc = > `qc`.施加 门=`U` 比特=0**
**p = > `qc`.概率**
-**p0 = p[^0]**
+**p0 = [0](p)**
**lo = > math.div a=4 b=10**
**hi = > math.div a=6 b=10**
diff --git a/tests/ext/quantum-draw-smoke.mq.md b/tests/ext/quantum-draw-smoke.mq.md
index d4cad1d..591707d 100644
--- a/tests/ext/quantum-draw-smoke.mq.md
+++ b/tests/ext/quantum-draw-smoke.mq.md
@@ -15,7 +15,7 @@ import quantum:ext/quantum/quantum.mq.md
**qc = > quantum.circuit qubits=2 steps=`steps`**
**img = > `qc`.draw kind="probs" path="quantum-draw-probs.svg"**
-**kind = img[^kind]**
+**kind = [kind](img)**
1. `kind` == probs
> print text=probs-ok
@@ -25,7 +25,7 @@ import quantum:ext/quantum/quantum.mq.md
**qc1 = > quantum.circuit qubits=1**
**qc1 = > `qc1`.h qubit=0**
**bloch = > `qc1`.draw kind="bloch" path="quantum-draw-bloch.svg"**
-**bk = bloch[^kind]**
+**bk = [kind](bloch)**
1. `bk` == bloch
> print text=bloch-ok
diff --git a/tests/ext/quantum-gate-heatmap-smoke.mq.md b/tests/ext/quantum-gate-heatmap-smoke.mq.md
index f8a803c..e5aa3c4 100644
--- a/tests/ext/quantum-gate-heatmap-smoke.mq.md
+++ b/tests/ext/quantum-gate-heatmap-smoke.mq.md
@@ -8,7 +8,7 @@ import quantum:ext/quantum/quantum.mq.md
**H = > quantum.gate name="H"**
**img = > `H`.draw kind="matrix" path="quantum-gate-heatmap.svg"**
-**kind = img[^kind]**
+**kind = [kind](img)**
1. `kind` == matrix
> print text=heatmap-ok
diff --git a/tests/ext/quantum-gates-smoke.mq.md b/tests/ext/quantum-gates-smoke.mq.md
index a7955d4..b3ea95e 100644
--- a/tests/ext/quantum-gates-smoke.mq.md
+++ b/tests/ext/quantum-gates-smoke.mq.md
@@ -14,7 +14,7 @@ H-Z-H on |0⟩ → |1⟩.
**qc = > `qc`.z qubit=0**
**qc = > `qc`.h qubit=0**
**p = > `qc`.probabilities**
-**p1 = p[^1]**
+**p1 = [1](p)**
**lo = > math.div a=9 b=10**
1. `p1` > `lo`
@@ -28,7 +28,7 @@ Ry(π) on |0⟩ → |1⟩.
**ry = > quantum.circuit qubits=1**
**ry = > `ry`.ry qubit=0 theta=`pi`**
**rp = > `ry`.probabilities**
-**rp1 = rp[^1]**
+**rp1 = [1](rp)**
1. `rp1` > `lo`
> print text=ry-ok
@@ -41,10 +41,10 @@ Bell run with fixed seed: both 00 and 11 appear; shots sum.
**bell = > `bell`.h qubit=0**
**bell = > `bell`.cx control=0 target=1**
**res = > `bell`.run shots=200 seed=42**
-**counts = res[^counts]**
-**c00 = counts[^00]**
-**c11 = counts[^11]**
-**shots = res[^shots]**
+**counts = [counts](res)**
+**c00 = [00](counts)**
+**c11 = [11](counts)**
+**shots = [shots](res)**
1. `c00`
1. `c11`
diff --git a/tests/ext/quantum-linalg-smoke.mq.md b/tests/ext/quantum-linalg-smoke.mq.md
index ad465f3..b6c5860 100644
--- a/tests/ext/quantum-linalg-smoke.mq.md
+++ b/tests/ext/quantum-linalg-smoke.mq.md
@@ -40,7 +40,7 @@ import math:lib/math.mq.md
> print text=expect-fail
**sch = > `qc`.schmidt cut=1**
-**ent = sch[^entropy]**
+**ent = [entropy](sch)**
**elo = > math.div a=1 b=2**
1. `ent` > `elo`
> print text=schmidt-ok
diff --git a/tests/ext/quantum-noise-smoke.mq.md b/tests/ext/quantum-noise-smoke.mq.md
index 2dbbde5..a9c1981 100644
--- a/tests/ext/quantum-noise-smoke.mq.md
+++ b/tests/ext/quantum-noise-smoke.mq.md
@@ -10,7 +10,7 @@ import quantum:ext/quantum/quantum.mq.md
**qc = > `qc`.i qubit=0**
**qc = > `qc`.noise kind="bitflip" p=1**
**r = > `qc`.run shots=32 seed=3**
-**c1 = r[^counts][^1]**
+**c1 = [1]([counts](r))**
1. `c1` == 32
> print text=noise-ok
diff --git a/tests/ext/quantum-noise-zh-smoke.mq.md b/tests/ext/quantum-noise-zh-smoke.mq.md
index df1d923..0b7f001 100644
--- a/tests/ext/quantum-noise-zh-smoke.mq.md
+++ b/tests/ext/quantum-noise-zh-smoke.mq.md
@@ -10,7 +10,7 @@ description: 噪声 bitflip p=1 后 I 使全部射中 |1⟩.
**qc = > `qc`.单位 比特=0**
**qc = > `qc`.噪声 种类="bitflip" 概率=1**
**r = > `qc`.运行 次数=32 种子=3**
-**c1 = r[^counts][^1]**
+**c1 = [1]([counts](r))**
1. `c1` == 32
> print text=noise-ok
diff --git a/tests/ext/quantum-steps-smoke.mq.md b/tests/ext/quantum-steps-smoke.mq.md
index 7605225..ddc66db 100644
--- a/tests/ext/quantum-steps-smoke.mq.md
+++ b/tests/ext/quantum-steps-smoke.mq.md
@@ -16,7 +16,7 @@ import math:lib/math.mq.md
**qc = > quantum.circuit qubits=2 steps=`steps`**
**p = > `qc`.probabilities**
-**p00 = p[^00]**
+**p00 = [00](p)**
**lo = > math.div a=2 b=5**
**hi = > math.div a=3 b=5**
@@ -29,7 +29,7 @@ import math:lib/math.mq.md
> print text=steps-fail
**img = > `qc`.draw path="quantum-steps-draw.svg"**
-**kind = img[^kind]**
+**kind = [kind](img)**
1. `kind` == circuit
> print text=draw-ok
diff --git a/tests/ext/quantum-zh-smoke.mq.md b/tests/ext/quantum-zh-smoke.mq.md
index 0f70e03..c2cc7e8 100644
--- a/tests/ext/quantum-zh-smoke.mq.md
+++ b/tests/ext/quantum-zh-smoke.mq.md
@@ -12,7 +12,7 @@ import math:lib/math.mq.md
**电路 = > `电路`.泡利Z 比特=0**
**电路 = > `电路`.哈达玛 比特=0**
**概率 = > `电路`.概率**
-**p1 = 概率[^1]**
+**p1 = [1](概率)**
**lo = > math.div a=9 b=10**
1. `p1` > `lo`
diff --git a/tests/ext/web-content-smoke.mq.md b/tests/ext/web-content-smoke.mq.md
index 884c28c..4e40ab4 100644
--- a/tests/ext/web-content-smoke.mq.md
+++ b/tests/ext/web-content-smoke.mq.md
@@ -24,15 +24,15 @@ import sys:lib/sys.mq.md
**page = > web.page title="Home"**
**page = > page.meta meta=`meta`**
-**mm = page[^meta]**
-**m = mm[^title]**
+**mm = [meta](page)**
+**m = [title](mm)**
1. `m` == "My Site"
> print text=meta-ok
2. *
> print text=meta-fail
**page = > page.paginate offset=0 limit=5 path="/"**
-**poff = page[^paginate][^offset]**
+**poff = [offset]([paginate](page))**
1. `poff` == 0
> print text=paginate-ok
2. *
diff --git a/tests/ext/web-db-w2-smoke.mq.md b/tests/ext/web-db-w2-smoke.mq.md
index ed88d79..fda8d13 100644
--- a/tests/ext/web-db-w2-smoke.mq.md
+++ b/tests/ext/web-db-w2-smoke.mq.md
@@ -49,8 +49,8 @@ import json:lib/json.mq.md
> print text=count-where-fail
**page1 = > `store`.paginate table="posts" limit=2 跳过=0**
-**total1 = page1[^total]**
-**p1r = page1[^rows]**
+**total1 = [total](page1)**
+**p1r = [rows](page1)**
**n1 = > len value=`p1r`**
1. `total1` == 4
1. `n1` == 2
@@ -59,7 +59,7 @@ import json:lib/json.mq.md
> print text=page-fail
**page2 = > `store`.paginate table="posts" limit=2 跳过=2**
-**p2r = page2[^rows]**
+**p2r = [rows](page2)**
**n2 = > len value=`p2r`**
1. `n2` == 2
> print text=page2-ok
@@ -107,7 +107,7 @@ import json:lib/json.mq.md
> print text=or-fail
**agg = > `store`.query sql="SELECT title, views FROM posts WHERE views >= 30 ORDER BY views DESC"**
-**nagg = agg[^count]**
+**nagg = [count](agg)**
1. `nagg` == 2
> print text=query-ok
2. *
diff --git a/tests/ext/web-db-w6-smoke.mq.md b/tests/ext/web-db-w6-smoke.mq.md
index 682eb1e..d7ec2c4 100644
--- a/tests/ext/web-db-w6-smoke.mq.md
+++ b/tests/ext/web-db-w6-smoke.mq.md
@@ -15,7 +15,7 @@ import web:ext/web/web.mq.md
| 2 | CREATE TABLE IF NOT EXISTS comments (id INTEGER PRIMARY KEY AUTOINCREMENT, post_id INTEGER NOT NULL, body TEXT NOT NULL, status TEXT NOT NULL DEFAULT 'pending') |
**m1 = > `store`.migrate steps=`steps`**
-**a1 = m1[^applied]**
+**a1 = [applied](m1)**
**n1 = > len value=`a1`**
1. `n1` == 2
> print text=migrate-ok
@@ -23,7 +23,7 @@ import web:ext/web/web.mq.md
> print text=migrate-fail
**m2 = > `store`.migrate steps=`steps`**
-**a2 = m2[^applied]**
+**a2 = [applied](m2)**
**n2 = > len value=`a2`**
1. `n2` == 0
> print text=migrate-idempotent-ok
@@ -68,15 +68,15 @@ import web:ext/web/web.mq.md
> `store`.fts table="posts" columns="title,body"
**hit = > `store`.search table="posts" q="hello" limit=10**
-**hn = hit[^count]**
+**hn = [count](hit)**
1. `hn` >= 1
> print text=fts-ok
2. *
> print text=fts-fail
-**rows2 = hit[^rows]**
-**first = rows2[^1]**
-**ft = first[^title]**
+**rows2 = [rows](hit)**
+**first = [1](rows2)**
+**ft = [title](first)**
1. `ft`
> print text=fts-row-ok
2. *
diff --git a/tests/ext/web-drivers-smoke.mq.md b/tests/ext/web-drivers-smoke.mq.md
index 4845974..92c6a3e 100644
--- a/tests/ext/web-drivers-smoke.mq.md
+++ b/tests/ext/web-drivers-smoke.mq.md
@@ -19,7 +19,7 @@ import sys:lib/sys.mq.md
**c = > web.cache url="memory:drivers-smoke"**
> `c`.set key="k1" value="v1" ttl=60
**g = > `c`.get key="k1"**
-**gv = g[^value]**
+**gv = [value](g)**
1. `gv` == "v1"
> print text=cache-ok
2. *
@@ -27,7 +27,7 @@ import sys:lib/sys.mq.md
> `c`.del key="k1"
**ex = > `c`.exists key="k1"**
-**eok = ex[^ok]**
+**eok = [ok](ex)**
1. `eok`
> print text=cache-del-fail
2. *
@@ -38,14 +38,14 @@ import sys:lib/sys.mq.md
**blob = > web.storage url="file:tests/ext/web-fixtures/data/drivers-blobs"**
> `blob`.put key="notes/a.txt" body="hello" content_type="text/plain"
**got = > `blob`.get key="notes/a.txt"**
-**body = got[^body]**
+**body = [body](got)**
1. `body` == "hello"
> print text=storage-ok
2. *
> print text=storage-fail
**ls = > `blob`.list prefix="notes/"**
-**n = ls[^count]**
+**n = [count](ls)**
1. `n` == 1
> print text=storage-list-ok
2. *
@@ -56,7 +56,7 @@ import sys:lib/sys.mq.md
**pg = > web.db url="postgres://marqdo:marqdo@127.0.0.1:5432/marqdo"**
-**purl = pg[^url]**
+**purl = [url](pg)**
1. `purl` == "postgres://marqdo:marqdo@127.0.0.1:5432/marqdo"
> print text=postgres-url-ok
2. *
@@ -65,7 +65,7 @@ import sys:lib/sys.mq.md
**s3 = > web.storage url="s3://bucket?endpoint=http://127.0.0.1:9000"**
-**sb = s3[^backend]**
+**sb = [backend](s3)**
1. `sb` == "s3"
> print text=s3-open-ok
2. *
diff --git a/tests/ext/web-g12-api-key-smoke.mq.md b/tests/ext/web-g12-api-key-smoke.mq.md
index 91cb577..6a50c62 100644
--- a/tests/ext/web-g12-api-key-smoke.mq.md
+++ b/tests/ext/web-g12-api-key-smoke.mq.md
@@ -18,13 +18,13 @@ import plugin:lib/plugin.mq.md
| 0ae9134cca7eff9d756fbf52402ee28ae0c2be22f01e53653e4fe86021479703 | read,api |
**ok = > web_api_key_check key="smoke-secret" authorization="" pepper=`pepper` keys=`keys`**
-1. ok[^ok]
+1. [ok](ok)
> print text=api-key-ok
2. *
> print text=api-key-fail
**bad = > web_api_key_check key="wrong" authorization="" pepper=`pepper` keys=`keys`**
-1. bad[^ok]
+1. [ok](bad)
> print text=api-key-bad-ok
2. *
> print text=api-key-bad-fail
diff --git a/tests/ext/web-hosting-helpers.mq.md b/tests/ext/web-hosting-helpers.mq.md
index c9fcc03..db9c2b0 100644
--- a/tests/ext/web-hosting-helpers.mq.md
+++ b/tests/ext/web-hosting-helpers.mq.md
@@ -12,7 +12,7 @@ Nested plugin call (`web.page`) while `app.listen` is the outer plugin frame —
must not clear GLOBAL_HOST so a second HTTP invoke still works.
**pg = > web.page title=`msg`**
-**title = pg[^title]**
+**title = [title](pg)**
`out` =
diff --git a/tests/ext/web-middleware-smoke.mq.md b/tests/ext/web-middleware-smoke.mq.md
index 073d347..e778206 100644
--- a/tests/ext/web-middleware-smoke.mq.md
+++ b/tests/ext/web-middleware-smoke.mq.md
@@ -50,33 +50,33 @@ import sys:lib/sys.mq.md
**app = > web.app page=`pg`**
**app = > `app`.configure cors=`cors` security=`sec` compress=True body_limit=1048576 json=`api`**
-**mw = app[^middleware]**
+**mw = [middleware](app)**
-**cobj = mw[^cors]**
-**origins = cobj[^allow_origins]**
-**o0 = origins[^1]**
+**cobj = [cors](mw)**
+**origins = [allow_origins](cobj)**
+**o0 = [1](origins)**
1. `o0` == "https://a.example"
> print text=cors-origin-ok
2. *
> print text=cors-origin-fail
-**methods = cobj[^methods]**
-**m1 = methods[^2]**
+**methods = [methods](cobj)**
+**m1 = [2](methods)**
1. `m1` == "POST"
> print text=cors-method-ok
2. *
> print text=cors-method-fail
-**expose = cobj[^expose_headers]**
-**e0 = expose[^1]**
+**expose = [expose_headers](cobj)**
+**e0 = [1](expose)**
1. `e0` == "X-Total"
> print text=cors-expose-ok
2. *
> print text=cors-expose-fail
-**cred = cobj[^credentials]**
+**cred = [credentials](cobj)**
1. `cred`
> print text=cors-cred-ok
2. *
@@ -84,14 +84,14 @@ import sys:lib/sys.mq.md
-**secmap = mw[^security]**
-**frame = secmap[^X-Frame-Options]**
+**secmap = [security](mw)**
+**frame = [X-Frame-Options](secmap)**
1. `frame` == "DENY"
> print text=security-frame-ok
2. *
> print text=security-frame-fail
-**csp = secmap[^Content-Security-Policy]**
+**csp = [Content-Security-Policy](secmap)**
1. `csp` == "default-src 'self'"
> print text=security-csp-ok
2. *
@@ -99,13 +99,13 @@ import sys:lib/sys.mq.md
-**comp = mw[^compress]**
+**comp = [compress](mw)**
1. `comp`
> print text=compress-ok
2. *
> print text=compress-fail
-**bl = mw[^body_limit]**
+**bl = [body_limit](mw)**
1. `bl` == 1048576
> print text=body-limit-ok
2. *
@@ -113,34 +113,34 @@ import sys:lib/sys.mq.md
-**jmap = mw[^json_routes]**
-**posts = jmap[^api/posts]**
-**pok = posts[^method]**
+**jmap = [json_routes](mw)**
+**posts = [api/posts](jmap)**
+**pok = [method](posts)**
1. `pok` == "GET"
> print text=json-get-ok
2. *
> print text=json-get-fail
-**ptable = posts[^table]**
+**ptable = [table](posts)**
1. `ptable` == "articles"
> print text=json-table-ok
2. *
> print text=json-table-fail
-**porder = posts[^order]**
+**porder = [order](posts)**
1. `porder` == "-created_at"
> print text=json-order-ok
2. *
> print text=json-order-fail
-**plimit = posts[^limit]**
+**plimit = [limit](posts)**
1. `plimit` == 20
> print text=json-limit-ok
2. *
> print text=json-limit-fail
-**pub = jmap[^api/publish]**
-**pmethod = pub[^method]**
+**pub = [api/publish](jmap)**
+**pmethod = [method](pub)**
1. `pmethod` == "POST"
> print text=json-post-ok
2. *
diff --git a/tests/ext/web-net-smoke.mq.md b/tests/ext/web-net-smoke.mq.md
index 8218f72..44b4eff 100644
--- a/tests/ext/web-net-smoke.mq.md
+++ b/tests/ext/web-net-smoke.mq.md
@@ -28,35 +28,35 @@ import sys:lib/sys.mq.md
**sess = > web_session_new ttl_sec=120**
-**sid = sess[^id]**
+**sid = [id](sess)**
1. `sid` != ""
> print text=session-new-ok
2. *
> print text=session-new-fail
**set1 = > web_session_set id=`sid` key="theme" value="dark"**
-**ok1 = set1[^ok]**
+**ok1 = [ok](set1)**
1. `ok1`
> print text=session-set-ok
2. *
> print text=session-set-fail
**get1 = > web_session_get id=`sid` key="theme"**
-**v1 = get1[^value]**
+**v1 = [value](get1)**
1. `v1` == "dark"
> print text=session-get-ok
2. *
> print text=session-get-fail
**del1 = > web_session_del id=`sid` key="theme"**
-**ok2 = del1[^ok]**
+**ok2 = [ok](del1)**
1. `ok2`
> print text=session-del-ok
2. *
> print text=session-del-fail
**get2 = > web_session_get id=`sid` key="theme"**
-**ok3 = get2[^ok]**
+**ok3 = [ok](get2)**
1. `ok3`
> print text=session-del-confirm-fail
2. *
@@ -65,43 +65,43 @@ import sys:lib/sys.mq.md
**login = > web_auth_login username="admin" password="secret" users=`users` session_ttl=120**
-**lok = login[^ok]**
+**lok = [ok](login)**
1. `lok`
> print text=auth-login-ok
2. *
> print text=auth-login-fail
-**sid2 = login[^session_id]**
+**sid2 = [session_id](login)**
**check = > web_auth_check session_id=`sid2`**
-**cok = check[^ok]**
+**cok = [ok](check)**
1. `cok`
> print text=auth-check-ok
2. *
> print text=auth-check-fail
**badlogin = > web_auth_login username="admin" password="wrong" users=`users` session_ttl=120**
-**bok = badlogin[^ok]**
+**bok = [ok](badlogin)**
1. `bok`
> print text=auth-bad-should-fail
2. *
> print text=auth-bad-ok
**zhlogin = > web_auth_login username="站长" password="pw123" users=`users` session_ttl=120**
-**zhok = zhlogin[^ok]**
+**zhok = [ok](zhlogin)**
1. `zhok`
> print text=auth-zh-ok
2. *
> print text=auth-zh-fail
**logout = > web_auth_logout session_id=`sid2`**
-**dok = logout[^ok]**
+**dok = [ok](logout)**
1. `dok`
> print text=auth-logout-ok
2. *
> print text=auth-logout-fail
**check2 = > web_auth_check session_id=`sid2`**
-**cok2 = check2[^ok]**
+**cok2 = [ok](check2)**
1. `cok2`
> print text=auth-logout-confirm-fail
2. *
@@ -112,18 +112,18 @@ import sys:lib/sys.mq.md
**pg = > web.page title="ws-test"**
**app = > web.app page=`pg` admin=True**
**app = > `app`.route_ws path="/live" echo=True**
-**routes = app[^ws_routes]**
-**has_live = routes[^/live]**
+**routes = [ws_routes](app)**
+**has_live = [/live](routes)**
1. `has_live`
> print text=ws-route-ok
2. *
> print text=ws-route-fail
**app = > `app`.auth users=`users` session_ttl=120**
-**authobj = app[^auth]**
-**ausers = authobj[^users]**
-**au1 = ausers[^1][^用户]**
-**ou1 = users[^1][^用户]**
+**authobj = [auth](app)**
+**ausers = [users](authobj)**
+**au1 = [用户]([1](ausers))**
+**ou1 = [用户]([1](users))**
1. `au1` == `ou1`
> print text=app-auth-ok
2. *
@@ -133,7 +133,7 @@ import sys:lib/sys.mq.md
**authz = > web.auth users=`users` session_ttl=120**
**login2 = > `authz`.login username="admin" password="secret"**
-**lok2 = login2[^ok]**
+**lok2 = [ok](login2)**
1. `lok2`
> print text=ext-auth-ok
2. *
@@ -141,7 +141,7 @@ import sys:lib/sys.mq.md
**ws = > web.ws timeout_sec=1**
**badurl = > `ws`.connect url="ws://127.0.0.1:1" message="hi"**
-**bwok = badurl[^ok]**
+**bwok = [ok](badurl)**
1. `bwok`
> print text=ws-connect-should-fail
2. *
diff --git a/tests/ext/web-p3-smoke.mq.md b/tests/ext/web-p3-smoke.mq.md
index 2973024..c1b19ae 100644
--- a/tests/ext/web-p3-smoke.mq.md
+++ b/tests/ext/web-p3-smoke.mq.md
@@ -48,7 +48,7 @@ import json:lib/json.mq.md
> `store`.insert table="posts" rows=`rows`
**got = > `store`.get table="posts" id=1**
-**ca = got[^created_at]**
+**ca = [created_at](got)**
1. `ca`
> print text=audit-insert-ok
2. *
@@ -57,14 +57,14 @@ import json:lib/json.mq.md
**upd = > json.parse text={"title":"Hello P3b"}**
> `store`.update table="posts" id=1 row=`upd`
**got2 = > `store`.get table="posts" id=1**
-**ua2 = got2[^updated_at]**
+**ua2 = [updated_at](got2)**
1. `ua2`
> print text=audit-update-ok
2. *
> print text=audit-update-fail
**fk = > `store`.query sql="SELECT sql FROM sqlite_master WHERE type='table' AND name='comments'"**
-**fkddl = fk[^rows][^1][^sql]**
+**fkddl = [sql]([1]([rows](fk)))**
1. `fkddl`
> print text=fk-ok
2. *
@@ -78,7 +78,7 @@ import json:lib/json.mq.md
| alice | secret | author |
**login = > web_auth_login username="alice" password="secret" users=`users` session_ttl=120**
-**role = login[^role]**
+**role = [role](login)**
1. `role` == "author"
> print text=rbac-login-ok
2. *
@@ -88,7 +88,7 @@ import json:lib/json.mq.md
**app = > web.app page=`pg` port=18130**
**app = > `app`.auth users=`users`**
**app = > `app`.gate path="/write*" roles="admin,author"**
-**gates = app[^gates]**
+**gates = [gates](app)**
**ng = > len value=`gates`**
1. `ng` >= 2
> print text=rbac-gate-ok
@@ -98,8 +98,8 @@ import json:lib/json.mq.md
**blob = > web.storage url="file:web-fixtures/data/p3-gallery"**
> `blob`.put key="uploads/a.txt" body="hi" content_type="text/plain"
**app = > `app`.gallery path="/gallery" storage=`blob` prefix="uploads/" title="Media" download_base="/_media"**
-**gal = app[^gallery_routes]**
-**g = gal[^/gallery]**
+**gal = [gallery_routes](app)**
+**g = [/gallery](gal)**
1. `g`
> print text=gallery-ok
2. *
diff --git a/tests/ext/web-proxy-invoke-smoke.mq.md b/tests/ext/web-proxy-invoke-smoke.mq.md
index 56b0e97..5e3c019 100644
--- a/tests/ext/web-proxy-invoke-smoke.mq.md
+++ b/tests/ext/web-proxy-invoke-smoke.mq.md
@@ -32,43 +32,43 @@ import sys:lib/sys.mq.md
**app = > `app`.proxy path="/v1/stream" upstream="https://example.com/v1/chat" stream=True headers_from_env="TOKEN=X-Token"**
**app = > `app`.invoke path="/api/ping" fn="demo.ping" method="GET" body="query"**
-**proutes = app[^proxy_routes]**
-**chat = proutes[^proxy/chat]**
-**up = chat[^upstream]**
+**proutes = [proxy_routes](app)**
+**chat = [proxy/chat](proutes)**
+**up = [upstream](chat)**
1. `up` == "$OPENAI_BASE_URL"
> print text=proxy-table-ok
2. *
> print text=proxy-table-fail
-**stream = chat[^stream]**
+**stream = [stream](chat)**
1. `stream`
> print text=proxy-stream-ok
2. *
> print text=proxy-stream-fail
-**hdr = chat[^headers_from_env]**
+**hdr = [headers_from_env](chat)**
1. `hdr` == "OPENAI_API_KEY=Authorization"
> print text=proxy-env-ok
2. *
> print text=proxy-env-fail
-**v1 = proutes[^v1/stream]**
-**v1u = v1[^upstream]**
+**v1 = [v1/stream](proutes)**
+**v1u = [upstream](v1)**
1. `v1u` == "https://example.com/v1/chat"
> print text=proxy-method-ok
2. *
> print text=proxy-method-fail
-**iroutes = app[^invoke_routes]**
-**echo = iroutes[^api/echo]**
-**efn = echo[^fn]**
+**iroutes = [invoke_routes](app)**
+**echo = [api/echo](iroutes)**
+**efn = [fn](echo)**
1. `efn` == "demo.echo"
> print text=invoke-table-ok
2. *
> print text=invoke-table-fail
-**ping = iroutes[^api/ping]**
-**pm = ping[^method]**
+**ping = [api/ping](iroutes)**
+**pm = [method](ping)**
1. `pm` == "GET"
> print text=invoke-method-ok
2. *
diff --git a/tests/ext/web-security-smoke.mq.md b/tests/ext/web-security-smoke.mq.md
index 6a438a2..19ce888 100644
--- a/tests/ext/web-security-smoke.mq.md
+++ b/tests/ext/web-security-smoke.mq.md
@@ -19,7 +19,7 @@ import sys:lib/sys.mq.md
**hash = > web_password_hash password="secret"**
-**h = hash[^hash]**
+**h = [hash](hash)**
1. `h` != ""
> print text=hash-ok
2. *
@@ -34,14 +34,14 @@ import sys:lib/sys.mq.md
| 1 | admin | secret |
**login = > web_auth_login username="admin" password="secret" users=`users` session_ttl=120**
-**lok = login[^ok]**
+**lok = [ok](login)**
1. `lok`
> print text=auth-login-ok
2. *
> print text=auth-login-fail
**bad = > web_auth_login username="admin" password="wrong" users=`users` session_ttl=120**
-**bok = bad[^ok]**
+**bok = [ok](bad)**
1. `bok`
> print text=auth-bad-should-fail
2. *
diff --git a/tests/ext/web-upload-smoke.mq.md b/tests/ext/web-upload-smoke.mq.md
index 0c90717..7cbc689 100644
--- a/tests/ext/web-upload-smoke.mq.md
+++ b/tests/ext/web-upload-smoke.mq.md
@@ -23,21 +23,21 @@ import sys:lib/sys.mq.md
**m = > web.media**
**ok = > `m`.validate filename="a.png" content_type="image/png" size=100 max_bytes=1000 types=`types`**
-**ook = ok[^ok]**
+**ook = [ok](ok)**
1. `ook`
> print text=validate-ok
2. *
> print text=validate-fail
**bad = > `m`.validate filename="a.exe" content_type="application/octet-stream" size=100 max_bytes=1000 types=`types`**
-**bok = bad[^ok]**
+**bok = [ok](bad)**
1. `bok`
> print text=reject-type-fail
2. *
> print text=reject-type-ok
**big = > `m`.validate filename="a.png" content_type="image/png" size=9000 max_bytes=1000 types=`types`**
-**gok = big[^ok]**
+**gok = [ok](big)**
1. `gok`
> print text=reject-size-fail
2. *
@@ -46,15 +46,15 @@ import sys:lib/sys.mq.md
**blob = > web.storage url="file:tests/ext/web-fixtures/data/upload-blobs"**
**m = > web.media storage=`blob`**
**saved = > `m`.save path="tests/ext/web-fixtures/upload/sample.txt" content_type="text/plain" prefix="smoke/"**
-**sok = saved[^ok]**
-**skey = saved[^key]**
+**sok = [ok](saved)**
+**skey = [key](saved)**
1. `sok`
> print text=save-ok
2. *
> print text=save-fail
**got = > `blob`.get key=`skey`**
-**body = got[^body]**
+**body = [body](got)**
1. `body` == "hello-upload"
> print text=save-roundtrip-ok
2. *
diff --git a/tests/ext/web-w7-finish-smoke.mq.md b/tests/ext/web-w7-finish-smoke.mq.md
index 11f7740..6701dd4 100644
--- a/tests/ext/web-w7-finish-smoke.mq.md
+++ b/tests/ext/web-w7-finish-smoke.mq.md
@@ -27,7 +27,7 @@ import sys:lib/sys.mq.md
> `store`.init name=posts fields=`fields`
**idx = > `store`.query sql="SELECT name FROM sqlite_master WHERE type='index' AND tbl_name='posts'"**
-**nidx = > len value=idx[^rows]**
+**nidx = > len value=[rows](idx)**
1. `nidx` >= 1
> print text=unique-ok
2. *
@@ -41,7 +41,7 @@ import sys:lib/sys.mq.md
| /about | 2026-08-28 |
**sm = > web_sitemap_build base="https://example.com" items=`items`**
-**xml = sm[^xml]**
+**xml = [xml](sm)**
1. `xml`
> print text=sitemap-ok
2. *
@@ -55,27 +55,27 @@ import sys:lib/sys.mq.md
**app = > `app`.error_page status=404 page=`notfound`**
**app = > `app`.sitemap path="/sitemap.xml" base="https://example.com" items=`items`**
**app = > `app`.robots sitemap="https://example.com/sitemap.xml"**
-**rd = app[^redirects]**
-**has = rd[^/old]**
+**rd = [redirects](app)**
+**has = [/old](rd)**
1. `has`
> print text=redirect-ok
2. *
> print text=redirect-fail
-**rb = app[^robots_body]**
+**rb = [robots_body](app)**
1. `rb`
> print text=robots-ok
2. *
> print text=robots-fail
-**mw = app[^middleware]**
-**cc = mw[^cache_control]**
+**mw = [middleware](app)**
+**cc = [cache_control](mw)**
1. `cc` == "public, max-age=60"
> print text=cache-control-ok
2. *
> print text=cache-control-fail
-**p404 = app[^page_404]**
+**p404 = [page_404](app)**
1. `p404`
> print text=error-page-ok
2. *
diff --git a/tests/ext/web-ws-broadcast-smoke.mq.md b/tests/ext/web-ws-broadcast-smoke.mq.md
index ba3797d..5e5b1af 100644
--- a/tests/ext/web-ws-broadcast-smoke.mq.md
+++ b/tests/ext/web-ws-broadcast-smoke.mq.md
@@ -16,17 +16,17 @@ import sys:lib/sys.mq.md
**pg = > web.page title="w6b"**
**app = > web.app page=`pg` port=18111**
**app = > `app`.route_ws path="/room" mode="broadcast"**
-**routes = app[^ws_routes]**
-**room = routes[^/room]**
-**mode = room[^mode]**
+**routes = [ws_routes](app)**
+**room = [/room](routes)**
+**mode = [mode](room)**
1. `mode` == "broadcast"
> print text=ws-broadcast-route-ok
2. *
> print text=ws-broadcast-route-fail
**app = > `app`.configure access_log=True compress=False**
-**mw = app[^middleware]**
-**al = mw[^access_log]**
+**mw = [middleware](app)**
+**al = [access_log](mw)**
1. `al`
> print text=access-log-ok
2. *
diff --git a/tests/lib/cli-sort-smoke.mq.md b/tests/lib/cli-sort-smoke.mq.md
index 20a57df..95e3d62 100644
--- a/tests/lib/cli-sort-smoke.mq.md
+++ b/tests/lib/cli-sort-smoke.mq.md
@@ -11,12 +11,12 @@ import cli:lib/cli.mq.md
**rows = > csv.parse text=`raw`**
**rows = > table.sort_by list=`rows` key="name"**
**r0 = > at value=`rows` index=0**
-> print text=`r0`[^name]
+> print text=[name](`r0`)
**args = > split value="--input,data.csv,rest,--verbose" sep=","**
**flags = > cli.parse args=`args`**
-> print text=`flags`[^input]
-> print text=`flags`[^verbose]
-**pos = `flags`[^_]**
+> print text=[input](`flags`)
+> print text=[verbose](`flags`)
+**pos = [_](`flags`)**
**p0 = > at value=`pos` index=0**
> print text=`p0`
diff --git a/tests/lib/csv-smoke.mq.md b/tests/lib/csv-smoke.mq.md
index e6a9709..e75f779 100644
--- a/tests/lib/csv-smoke.mq.md
+++ b/tests/lib/csv-smoke.mq.md
@@ -12,8 +12,8 @@ import csv:lib/csv.mq.md
> print text=`n`
**r0 = > at value=`rows` index=0**
-> print text=`r0`[^name]
-> print text=`r0`[^note]
+> print text=[name](`r0`)
+> print text=[note](`r0`)
**out = > csv.stringify rows=`rows`**
**rows2 = > csv.parse text=`out`**
diff --git a/tests/lib/datetime-smoke.mq.md b/tests/lib/datetime-smoke.mq.md
index 0844fbc..e6d83fc 100644
--- a/tests/lib/datetime-smoke.mq.md
+++ b/tests/lib/datetime-smoke.mq.md
@@ -6,10 +6,10 @@ import dt:lib/datetime.mq.md
# main
**m = > dt.from_unix unix=0**
-> print text=`m`[^iso]
+> print text=[iso](`m`)
**sh = > dt.in_zone dt=`m` zone="Asia/Shanghai"**
-> print text=`sh`[^iso]
+> print text=[iso](`sh`)
**p = > dt.parse text="2020-01-02T03:04:05+08:00"**
**u = > dt.to_unix dt=`p`**
diff --git a/tests/lib/fs-mid2-smoke.mq.md b/tests/lib/fs-mid2-smoke.mq.md
index 08c8813..ad29393 100644
--- a/tests/lib/fs-mid2-smoke.mq.md
+++ b/tests/lib/fs-mid2-smoke.mq.md
@@ -12,9 +12,9 @@ import fs:lib/fs.mq.md
> fs.write_text path="m9-tree/nested/b.txt" text="B"
**st = > fs.stat path="m9-tree/a.txt"**
-> print text=`st`[^size]
-> print text=`st`[^is_file]
-> print text=`st`[^is_dir]
+> print text=[size](`st`)
+> print text=[is_file](`st`)
+> print text=[is_dir](`st`)
**w = > fs.walk path="m9-tree"**
**n = > len `w`**
diff --git a/tests/lib/net-cookie.mq.md b/tests/lib/net-cookie.mq.md
index d5a0967..3b9bb68 100644
--- a/tests/lib/net-cookie.mq.md
+++ b/tests/lib/net-cookie.mq.md
@@ -9,9 +9,9 @@ import net:lib/net.mq.md
**resp = > net.cookie_parse text="id=42; Path=/; HttpOnly; Secure; SameSite=Lax, theme=light; Max-Age=3600" is_response=True**
-> print text=`req`[^1][^name]
-> print text=`req`[^1][^value]
-> print text=`resp`[^1][^http_only]
-> print text=`resp`[^1][^secure]
-> print text=`resp`[^1][^same_site]
-> print text=`resp`[^2][^max_age]
+> print text=[name]([1](`req`))
+> print text=[value]([1](`req`))
+> print text=[http_only]([1](`resp`))
+> print text=[secure]([1](`resp`))
+> print text=[same_site]([1](`resp`))
+> print text=[max_age]([2](`resp`))
diff --git a/tests/lib/net-multipart.mq.md b/tests/lib/net-multipart.mq.md
index de33eb8..d9c812a 100644
--- a/tests/lib/net-multipart.mq.md
+++ b/tests/lib/net-multipart.mq.md
@@ -11,9 +11,9 @@ import net:lib/net.mq.md
**parts = > net.multipart_parse body=`body` boundary=`boundary`**
-> print text=`parts`[^1][^name]
-> print text=`parts`[^1][^value]
-> print text=`parts`[^2][^name]
-> print text=`parts`[^2][^filename]
-> print text=`parts`[^2][^content_type]
-> print text=`parts`[^2][^value]
+> print text=[name]([1](`parts`))
+> print text=[value]([1](`parts`))
+> print text=[name]([2](`parts`))
+> print text=[filename]([2](`parts`))
+> print text=[content_type]([2](`parts`))
+> print text=[value]([2](`parts`))
diff --git a/tests/lib/sys-exec-capture.mq.md b/tests/lib/sys-exec-capture.mq.md
index 72be710..0db9c97 100644
--- a/tests/lib/sys-exec-capture.mq.md
+++ b/tests/lib/sys-exec-capture.mq.md
@@ -15,8 +15,8 @@ import json:lib/json.mq.md
**args = > json.parse text=["-c","printf hi-capture"]**
**out = > sys.exec cmd="sh" args=args capture=True**
-**c = out[^code]**
-**s = out[^stdout]**
+**c = [code](out)**
+**s = [stdout](out)**
1. `c` == 0
> print text=capture-code-ok
2. *
diff --git a/tests/lib/table-collections.mq.md b/tests/lib/table-collections.mq.md
index 7c26cc1..8d75175 100644
--- a/tests/lib/table-collections.mq.md
+++ b/tests/lib/table-collections.mq.md
@@ -7,7 +7,7 @@ import table:lib/table.mq.md
# main
**h = > table.put in=None at="Authorization" value="Bearer-x"**
-> print text=`h`[^Authorization]
+> print text=[Authorization](`h`)
`xs` =
@@ -17,8 +17,8 @@ import table:lib/table.mq.md
| b |
**xs = > table.put in=`xs` at=1 value="A"**
-> print text=`xs`[^1]
-> print text=`xs`[^2]
+> print text=[1](`xs`)
+> print text=[2](`xs`)
`req` =
@@ -31,8 +31,8 @@ import table:lib/table.mq.md
**messages = > table.append list=None item=`msg`**
**req = > table.put in=`req` at="messages" value=`messages`**
**req = > table.put in=`req` at="stream" value=True**
-> print text=`req`[^messages][^1][^content]
-> print text=`req`[^stream]
+> print text=[content]([1]([messages](`req`)))
+> print text=[stream](`req`)
**xs = > table.append list=`xs` item="c"**
**n = > table.len xs=`xs`**
diff --git a/tests/lib/toml-html-encoding-smoke.mq.md b/tests/lib/toml-html-encoding-smoke.mq.md
index 9123eb2..fc229ba 100644
--- a/tests/lib/toml-html-encoding-smoke.mq.md
+++ b/tests/lib/toml-html-encoding-smoke.mq.md
@@ -8,10 +8,10 @@ import enc:lib/encoding.mq.md
# main
**cfg = > toml.parse text="name = \"marqdo\"\ncount = 2\n[pkg]\nver = \"1\"\n"**
-> print text=`cfg`[^name]
-> print text=`cfg`[^count]
-**pkg = `cfg`[^pkg]**
-> print text=`pkg`[^ver]
+> print text=[name](`cfg`)
+> print text=[count](`cfg`)
+**pkg = [pkg](`cfg`)**
+> print text=[ver](`pkg`)
**e = > html.escape text="a