Drop redundant backticks in *…* / **…** code segments
Value-expression variables inside *…* / **…** segments no longer need backticks (the segment markers already mark code). Drop trailing spaces and de-tick value-expression variable names in tests and skill docs; keep backticks for string interpolation, call args, and method receivers. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1bf414c745
commit
f275d1e030
112 files changed
+762
-761
No files matched your search
@@ -10,6 +10,6 @@ import foreign:lib/foreign.mq.md
|
||||
print("hello-from-python")
|
||||
```
|
||||
|
||||
*`out` = > foreign.run code=`hi` *
|
||||
*out = > foreign.run code=`hi`*
|
||||
|
||||
> print text=`out`
|
||||
@@ -5,6 +5,6 @@ import foreign:lib/foreign.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`out` = > foreign.run_lang lang=python source=print(2+2) *
|
||||
*out = > foreign.run_lang lang=python source=print(2+2)*
|
||||
|
||||
> print text=`out`
|
||||
@@ -5,13 +5,13 @@ import fs:lib/fs.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`ok` = > fs.exists path=hello.txt *
|
||||
*ok = > fs.exists path=hello.txt*
|
||||
|
||||
1. `ok`
|
||||
> print text=exists
|
||||
2. *
|
||||
> print text=missing
|
||||
|
||||
*`t` = > fs.read_text path=hello.txt *
|
||||
*t = > fs.read_text path=hello.txt*
|
||||
|
||||
> print text=`t`
|
||||
@@ -5,6 +5,6 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`q` = > json.quote text=hi *
|
||||
*q = > json.quote text=hi*
|
||||
|
||||
> print text=`q`
|
||||
@@ -6,18 +6,18 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`raw` = > fs.read_text path=sample.json *
|
||||
*raw = > fs.read_text path=sample.json*
|
||||
|
||||
*`obj` = > json.parse text=`raw` *
|
||||
*obj = > json.parse text=`raw`*
|
||||
|
||||
*`ty` = > type `obj` *
|
||||
*ty = > type `obj`*
|
||||
|
||||
> print text=`ty`
|
||||
|
||||
*`a` = > json.get value=`obj` key=a *
|
||||
*a = > json.get value=`obj` key=a*
|
||||
|
||||
> print text=`a`
|
||||
|
||||
*`out` = > json.stringify value=`obj` *
|
||||
*out = > json.stringify value=`obj`*
|
||||
|
||||
> print text=`out`
|
||||
@@ -10,16 +10,16 @@ $$
|
||||
x^3
|
||||
$$
|
||||
|
||||
*`df` = > math.diff formula=`f` var=x *
|
||||
*df = > math.diff formula=`f` var=x*
|
||||
|
||||
*`ty` = > type `df` *
|
||||
*ty = > type `df`*
|
||||
|
||||
> print text=`ty`
|
||||
|
||||
*`df2` = > math.diff formula=`df` var=x *
|
||||
*df2 = > math.diff formula=`df` var=x*
|
||||
|
||||
> print text=`df2`
|
||||
|
||||
*`y` = > math.eval formula=`df` var=x value=2 *
|
||||
*y = > math.eval formula=`df` var=x value=2*
|
||||
|
||||
> print text=`y`
|
||||
@@ -10,18 +10,18 @@ $$
|
||||
x^2 - 2
|
||||
$$
|
||||
|
||||
*`ty` = > type `f` *
|
||||
*ty = > type `f`*
|
||||
|
||||
> print text=`ty`
|
||||
|
||||
*`df` = > math.diff formula=`f` var=x *
|
||||
*df = > math.diff formula=`f` var=x*
|
||||
|
||||
> print text=`df`
|
||||
|
||||
*`roots` = > math.solve formula=`f` var=x *
|
||||
*roots = > math.solve formula=`f` var=x*
|
||||
|
||||
> print text=`roots`
|
||||
|
||||
*`y` = > math.eval formula=`f` var=x value=3 *
|
||||
*y = > math.eval formula=`f` var=x value=3*
|
||||
|
||||
> print text=`y`
|
||||
@@ -10,8 +10,8 @@ $$
|
||||
x^2
|
||||
$$
|
||||
|
||||
*`svg` = > math.plot formula=`f` var=x min=-2 max=2 *
|
||||
*svg = > math.plot formula=`f` var=x min=-2 max=2*
|
||||
|
||||
*`ok` = > type `svg` *
|
||||
*ok = > type `svg`*
|
||||
|
||||
> print text=`ok`
|
||||
@@ -7,13 +7,13 @@ import math:lib/math.mq.md
|
||||
|
||||
> math.seed value=42
|
||||
|
||||
*`a` = > math.random_int min=1 max=10 *
|
||||
*a = > math.random_int min=1 max=10*
|
||||
|
||||
*`b` = > math.random_int min=1 max=10 *
|
||||
*b = > math.random_int min=1 max=10*
|
||||
|
||||
> math.seed value=42
|
||||
|
||||
*`c` = > math.random_int min=1 max=10 *
|
||||
*c = > math.random_int min=1 max=10*
|
||||
|
||||
> print text=`a`
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ import net:lib/net.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`e` = > net.url_encode text=a b *
|
||||
*e = > net.url_encode text=a b*
|
||||
|
||||
> print text=`e`
|
||||
@@ -7,26 +7,26 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`fixture` = "data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"think\"}}]}\n\ndata: {\"choices\":[{\"delta\":{\"content\":\"Hi\"}}]}\n\ndata: [DONE]\n" *
|
||||
*fixture = "data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"think\"}}]}\n\ndata: {\"choices\":[{\"delta\":{\"content\":\"Hi\"}}]}\n\ndata: [DONE]\n"*
|
||||
|
||||
*`events` = > net.openai_sse_parse text=`fixture` *
|
||||
*`n` = > len value=`events` *
|
||||
*events = > net.openai_sse_parse text=`fixture`*
|
||||
*n = > len value=`events`*
|
||||
> print text=`n`
|
||||
|
||||
*`e0` = > at value=`events` index=0 *
|
||||
*`t0` = > json.get value=`e0` key=type *
|
||||
*`x0` = > json.get value=`e0` key=text *
|
||||
*e0 = > at value=`events` index=0*
|
||||
*t0 = > json.get value=`e0` key=type*
|
||||
*x0 = > json.get value=`e0` key=text*
|
||||
> print text=`t0`
|
||||
> print text=`x0`
|
||||
|
||||
*`e1` = > at value=`events` index=1 *
|
||||
*`t1` = > json.get value=`e1` key=type *
|
||||
*`x1` = > json.get value=`e1` key=text *
|
||||
*e1 = > at value=`events` index=1*
|
||||
*t1 = > json.get value=`e1` key=type*
|
||||
*x1 = > json.get value=`e1` key=text*
|
||||
> print text=`t1`
|
||||
> print text=`x1`
|
||||
|
||||
*`e2` = > at value=`events` index=2 *
|
||||
*`t2` = > json.get value=`e2` key=type *
|
||||
*`r2` = > json.get value=`e2` key=result *
|
||||
*e2 = > at value=`events` index=2*
|
||||
*t2 = > json.get value=`e2` key=type*
|
||||
*r2 = > json.get value=`e2` key=result*
|
||||
> print text=`t2`
|
||||
> print text=`r2`
|
||||
@@ -6,17 +6,17 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`fixture` = "data: {\"choices\":[{\"delta\":{\"content\":\"Hel\"}}]}\n\ndata: {\"choices\":[{\"delta\":{\"content\":\"lo\"}}]}\n\ndata: [DONE]\n" *
|
||||
*fixture = "data: {\"choices\":[{\"delta\":{\"content\":\"Hel\"}}]}\n\ndata: {\"choices\":[{\"delta\":{\"content\":\"lo\"}}]}\n\ndata: [DONE]\n"*
|
||||
|
||||
*`events` = > net.openai_sse_parse text=`fixture` *
|
||||
*events = > net.openai_sse_parse text=`fixture`*
|
||||
|
||||
- [`ev`](`events`)
|
||||
*`t` = > json.get value=`ev` key=type *
|
||||
*t = > json.get value=`ev` key=type*
|
||||
1. `t` == "delta"
|
||||
*`chunk` = > json.get value=`ev` key=text *
|
||||
*chunk = > json.get value=`ev` key=text*
|
||||
> print text=`chunk`
|
||||
2. `t` == "done"
|
||||
*`answer` = > json.get value=`ev` key=result *
|
||||
*answer = > json.get value=`ev` key=result*
|
||||
> print text=`answer`
|
||||
3. *
|
||||
> print text=bad
|
||||
@@ -7,14 +7,14 @@ import sys:lib/sys.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`p` = > sys.env_get name=MARQDO_TEST_PLUGIN *
|
||||
*p = > sys.env_get name=MARQDO_TEST_PLUGIN*
|
||||
|
||||
> plugin.load path=`p`
|
||||
|
||||
*`sum` = > demo_add a=1 b=2 *
|
||||
*sum = > demo_add a=1 b=2*
|
||||
|
||||
> print text=`sum`
|
||||
|
||||
*`echo` = > demo_echo text=ok *
|
||||
*echo = > demo_echo text=ok*
|
||||
|
||||
> print text=`echo`
|
||||
@@ -6,11 +6,11 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`args` = > json.parse text={"n":21} *
|
||||
*args = > json.parse text={"n":21}*
|
||||
|
||||
*`id` = > subtask.spawn fn=worker args=`args` *
|
||||
*id = > subtask.spawn fn=worker args=`args`*
|
||||
|
||||
*`v` = > subtask.wait id=`id` *
|
||||
*v = > subtask.wait id=`id`*
|
||||
|
||||
> print text=`v`
|
||||
|
||||
@@ -19,4 +19,4 @@ import json:lib/json.mq.md
|
||||
## worker
|
||||
+ `n`
|
||||
|
||||
**`n` * 2**
|
||||
**n * 2**
|
||||
@@ -10,8 +10,8 @@ import subtask:lib/subtask.mq.md
|
||||
print(7 + 8)
|
||||
```
|
||||
|
||||
*`id` = > subtask.spawn code=`py` *
|
||||
*id = > subtask.spawn code=`py`*
|
||||
|
||||
*`out` = > subtask.wait id=`id` *
|
||||
*out = > subtask.wait id=`id`*
|
||||
|
||||
> print text=`out`
|
||||
@@ -6,11 +6,11 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`id` = > subtask.spawn path=subtask-child-print.mq.md *
|
||||
*`waited` = > subtask.wait id=`id` *
|
||||
*`code` = > json.get value=`waited` key=code *
|
||||
*`val` = > json.get value=`waited` key=value *
|
||||
*`stdout` = > json.get value=`waited` key=stdout *
|
||||
*id = > subtask.spawn path=subtask-child-print.mq.md*
|
||||
*waited = > subtask.wait id=`id`*
|
||||
*code = > json.get value=`waited` key=code*
|
||||
*val = > json.get value=`waited` key=value*
|
||||
*stdout = > json.get value=`waited` key=stdout*
|
||||
|
||||
1. `code` == 0
|
||||
1. `val` == "child_ok"
|
||||
|
||||
@@ -6,11 +6,11 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`id` = > subtask.spawn path=subtask-child.mq.md quiet=False *
|
||||
*id = > subtask.spawn path=subtask-child.mq.md quiet=False*
|
||||
|
||||
*`waited` = > subtask.wait id=`id` *
|
||||
*`code` = > json.get value=`waited` key=code *
|
||||
*`val` = > json.get value=`waited` key=value *
|
||||
*waited = > subtask.wait id=`id`*
|
||||
*code = > json.get value=`waited` key=code*
|
||||
*val = > json.get value=`waited` key=value*
|
||||
|
||||
1. `code` == 0
|
||||
> print text=`val`
|
||||
@@ -19,11 +19,11 @@ import json:lib/json.mq.md
|
||||
|
||||
> print text=done
|
||||
|
||||
*`id2` = > subtask.spawn path=subtask-child.mq.md *
|
||||
*id2 = > subtask.spawn path=subtask-child.mq.md*
|
||||
|
||||
*`waited2` = > subtask.wait id=`id2` *
|
||||
*`code2` = > json.get value=`waited2` key=code *
|
||||
*`val2` = > json.get value=`waited2` key=value *
|
||||
*waited2 = > subtask.wait id=`id2`*
|
||||
*code2 = > json.get value=`waited2` key=code*
|
||||
*val2 = > json.get value=`waited2` key=value*
|
||||
|
||||
1. `code2` == 0
|
||||
1. `val2` == "child_ok"
|
||||
|
||||
@@ -5,9 +5,9 @@ import sys:lib/sys.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`d` = > sys.cwd *
|
||||
*d = > sys.cwd*
|
||||
|
||||
*`n` = > len `d` *
|
||||
*n = > len `d`*
|
||||
|
||||
1. `n` > 0
|
||||
> print text=cwd-ok
|
||||
|
||||
@@ -10,6 +10,6 @@ import fs:lib/fs.mq.md
|
||||
|
||||
> sys.load_dotenv path=dotenv-fixture.env
|
||||
|
||||
*`v` = > sys.env_get name=MARQDO_DOTENV_FIXTURE *
|
||||
*v = > sys.env_get name=MARQDO_DOTENV_FIXTURE*
|
||||
|
||||
> print text=`v`
|
||||
@@ -6,7 +6,7 @@ import table:lib/table.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`h` = > table.put in=None at=Authorization value=Bearer-x*
|
||||
*h = > table.put in=None at=Authorization value=Bearer-x*
|
||||
> print text=`h`[^Authorization]
|
||||
|
||||
`xs` =
|
||||
@@ -16,7 +16,7 @@ import table:lib/table.mq.md
|
||||
| a |
|
||||
| b |
|
||||
|
||||
*`xs` = > table.put in=`xs` at=1 value=A*
|
||||
*xs = > table.put in=`xs` at=1 value=A*
|
||||
> print text=`xs`[^1]
|
||||
> print text=`xs`[^2]
|
||||
|
||||
@@ -26,22 +26,22 @@ import table:lib/table.mq.md
|
||||
|-------|----------|
|
||||
| m1 | None |
|
||||
|
||||
*`msg` = > table.put in=None at=role value=user*
|
||||
*`msg` = > table.put in=`msg` at=content value=hi*
|
||||
*`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*
|
||||
*msg = > table.put in=None at=role value=user*
|
||||
*msg = > table.put in=`msg` at=content value=hi*
|
||||
*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]
|
||||
|
||||
*`xs` = > table.append list=`xs` item=c*
|
||||
*`n` = > table.len xs=`xs`*
|
||||
*xs = > table.append list=`xs` item=c*
|
||||
*n = > table.len xs=`xs`*
|
||||
> print text=`n`
|
||||
|
||||
*`m` = > table.merge a=`h` b=`msg`*
|
||||
*`ks` = > table.keys map=`m`*
|
||||
*m = > table.merge a=`h` b=`msg`*
|
||||
*ks = > table.keys map=`m`*
|
||||
> print text=`ks`
|
||||
|
||||
*`empty` = > table.empty_map*
|
||||
*`sz` = > table.size map=`empty`*
|
||||
*empty = > table.empty_map*
|
||||
*sz = > table.size map=`empty`*
|
||||
> print text=`sz`
|
||||
@@ -5,11 +5,11 @@ import time:lib/time.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`s` = > time.format unix=0 pattern=%Y-%m-%d *
|
||||
*s = > time.format unix=0 pattern=%Y-%m-%d*
|
||||
|
||||
> print text=`s`
|
||||
|
||||
*`u` = > time.parse text=1970-01-01 00:00:00 pattern=%Y-%m-%d %H:%M:%S *
|
||||
*u = > time.parse text=1970-01-01 00:00:00 pattern=%Y-%m-%d %H:%M:%S*
|
||||
|
||||
> print text=`u`
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import json:lib/json.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`anchor` = > host_outer_call_line *
|
||||
*anchor = > host_outer_call_line*
|
||||
<!-- marqdo-out ok
|
||||
async-ok
|
||||
-->
|
||||
@@ -30,8 +30,8 @@ async-ok
|
||||
pending
|
||||
-->
|
||||
|
||||
*`wb` = > json.parse text={"key":"ok","value":"async-ok"} *
|
||||
*`wb` = > json.set map=`wb` key=line value=`anchor` *
|
||||
*wb = > json.parse text={"key":"ok","value":"async-ok"}*
|
||||
*wb = > json.set map=`wb` key=line value=`anchor`*
|
||||
> subtask.spawn fn=persist_slot args=`wb`
|
||||
|
||||
> print text=spawned
|
||||
@@ -5,7 +5,7 @@ import writeback:lib/writeback.mq.md
|
||||
|
||||
# main
|
||||
|
||||
*`out` = > writeback.get *
|
||||
*out = > writeback.get*
|
||||
|
||||
<!-- marqdo-out
|
||||
hello-writeback
|
||||
|
||||
@@ -10,6 +10,6 @@ title: foreign zh
|
||||
print("中文外联")
|
||||
```
|
||||
|
||||
*`out` = > 外联.运行 代码=`hi` *
|
||||
*out = > 外联.运行 代码=`hi`*
|
||||
|
||||
> print text=`out`
|
||||
@@ -5,12 +5,12 @@ title: math num + zh
|
||||
|
||||
# main
|
||||
|
||||
*`p` = > 数学.圆周率 *
|
||||
*p = > 数学.圆周率*
|
||||
|
||||
*`t` = > type `p` *
|
||||
*t = > type `p`*
|
||||
|
||||
> print text=`t`
|
||||
|
||||
*`s` = > 数学.正弦 value=0 *
|
||||
*s = > 数学.正弦 value=0*
|
||||
|
||||
> print text=`s`
|
||||
@@ -5,13 +5,13 @@ title: 中文文件库
|
||||
|
||||
# main
|
||||
|
||||
*`有` = > 文件.存在 路径=hello.txt *
|
||||
*有 = > 文件.存在 路径=hello.txt*
|
||||
|
||||
1. `有`
|
||||
> 打印 内容=存在
|
||||
2. *
|
||||
> 打印 内容=缺失
|
||||
|
||||
*`t` = > 文件.读文本 路径=hello.txt *
|
||||
*t = > 文件.读文本 路径=hello.txt*
|
||||
|
||||
> 打印 内容=`t`
|
||||
@@ -6,7 +6,7 @@ description: 改 + 列表字典
|
||||
|
||||
# main
|
||||
|
||||
*`h` = > 表.改 入=None 于=Authorization 值=Bearer-x*
|
||||
*h = > 表.改 入=None 于=Authorization 值=Bearer-x*
|
||||
> 打印 内容=`h`[^Authorization]
|
||||
|
||||
`xs` =
|
||||
@@ -16,9 +16,9 @@ description: 改 + 列表字典
|
||||
| a |
|
||||
| b |
|
||||
|
||||
*`xs` = > 表.改 入=`xs` 于=1 值=A*
|
||||
*xs = > 表.改 入=`xs` 于=1 值=A*
|
||||
> 打印 内容=`xs`[^1]
|
||||
|
||||
*`xs` = > 表.追加 list=`xs` item=c*
|
||||
*`n` = > 表.长度 xs=`xs`*
|
||||
*xs = > 表.追加 list=`xs` item=c*
|
||||
*n = > 表.长度 xs=`xs`*
|
||||
> 打印 内容=`n`
|
||||
Reference in new issue
Block a user