fix(public): quote italic call-arg string literals for pages CI
Bare identifiers inside *…* are variables; quote text args (and var="x") so marqdo run on public/*.mq.md succeeds. Narrow pages.yml exclude to utils.mq.md and 工具.mq.md instead of overly broad ??.mq.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
86bfb0648c
commit
6db3da1cc0
20 files changed
+53
-53
No files matched your search
@@ -29,7 +29,7 @@ jobs:
|
||||
run: |
|
||||
cargo build --release
|
||||
# Skip import helpers (no `# main`); exclude both EN/ZH names.
|
||||
find public -name '*.mq.md' ! -name 'utils.mq.md' ! -name '??.mq.md' -print0 \
|
||||
find public -name '*.mq.md' ! -name 'utils.mq.md' ! -name '工具.mq.md' -print0 \
|
||||
| xargs -0 -n1 ./target/release/marqdo run
|
||||
./target/release/marqdo view output public -o public
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ $$
|
||||
|
||||
Then plot it:
|
||||
|
||||
*`_svg` = > math.plot formula=`f` var=x min=-3 max=3 *
|
||||
*`_svg` = > math.plot formula=`f` var="x" min=-3 max=3*
|
||||
|
||||
The foreign library lets you call external code, for example:
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ $$
|
||||
|
||||
之后让我们画个图像吧!
|
||||
|
||||
*`_svg` = > 数学.绘图 formula=`f` var=x min=-3 max=3 *
|
||||
*`_svg` = > 数学.绘图 formula=`f` var="x" min=-3 max=3*
|
||||
|
||||
外联库则允许你调用外部代码,例如:
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ GHZ (3 qubits): H on q0, then CX 0→1 and 0→2. Ideal |000⟩ / |111⟩ each
|
||||
| 2 | CX | 0,1 |
|
||||
| 3 | CX | 0,2 |
|
||||
|
||||
*`qc` = > quantum.circuit qubits=3 steps=`steps` *
|
||||
*`p` = > `qc`.probabilities *
|
||||
*`_` = > `qc`.draw kind=probs *
|
||||
*`H` = > quantum.gate name=H *
|
||||
*`__` = > `H`.draw kind=matrix *
|
||||
*`qc` = > quantum.circuit qubits=3 steps=`steps`*
|
||||
*`p` = > `qc`.probabilities*
|
||||
*`_` = > `qc`.draw kind="probs"*
|
||||
*`H` = > quantum.gate name="H"*
|
||||
*`__` = > `H`.draw kind="matrix"*
|
||||
|
||||
> print text=`p`
|
||||
> print text=quantum-feature-ok
|
||||
@@ -18,11 +18,11 @@ GHZ(3 比特):q0 哈达玛,再控非 0→1、0→2。理想 |000⟩ / |1
|
||||
| 2 | CX | 0,1 |
|
||||
| 3 | CX | 0,2 |
|
||||
|
||||
*`qc` = > 量子.电路 比特数=3 步骤=`步骤` *
|
||||
*`p` = > `qc`.概率 *
|
||||
*`_` = > `qc`.绘图 种类=probs *
|
||||
*`H` = > 量子.门 名=H *
|
||||
*`__` = > `H`.绘图 种类=matrix *
|
||||
*`qc` = > 量子.电路 比特数=3 步骤=`步骤`*
|
||||
*`p` = > `qc`.概率*
|
||||
*`_` = > `qc`.绘图 种类="probs"*
|
||||
*`H` = > 量子.门 名="H"*
|
||||
*`__` = > `H`.绘图 种类="matrix"*
|
||||
|
||||
> 打印 内容=`p`
|
||||
> 打印 内容=量子特性-ok
|
||||
@@ -8,6 +8,6 @@ stdin: Ada
|
||||
|
||||
The input builtin reads one line. For demos and marqdo view / static export, put sample lines in frontmatter (stdin:). CLI can also use a pipe or --stdin-file. Live view can override with the Preset input box.
|
||||
|
||||
*`name` = > input prompt=Name: *
|
||||
*`name` = > input prompt="Name: "*
|
||||
|
||||
> print text=Hello `name`!
|
||||
@@ -19,13 +19,13 @@ Length and type:
|
||||
|
||||
Trim, split, join, and index:
|
||||
|
||||
*`t` = > trim value= hi *
|
||||
*`t` = > trim value=" hi "*
|
||||
|
||||
*`parts` = > split value=a,b sep=,*
|
||||
*`parts` = > split value="a,b" sep=","*
|
||||
|
||||
*`mid` = > at value=`parts` index=0*
|
||||
|
||||
*`j` = > join value=`parts` sep=-*
|
||||
*`j` = > join value=`parts` sep="-"*
|
||||
|
||||
> print text=`t`
|
||||
|
||||
|
||||
@@ -19,13 +19,13 @@ description: 主机内置;中文别名覆盖常用几个
|
||||
|
||||
去空白、拆分、拼接、按下标(主机名仍为英文):
|
||||
|
||||
*`t` = > trim value= 嗨 *
|
||||
*`t` = > trim value=" 嗨 "*
|
||||
|
||||
*`parts` = > split value=甲,乙 sep=,*
|
||||
*`parts` = > split value="甲,乙" sep=","*
|
||||
|
||||
*`mid` = > at value=`parts` index=0*
|
||||
|
||||
*`j` = > join value=`parts` sep=-*
|
||||
*`j` = > join value=`parts` sep="-"*
|
||||
|
||||
> 打印 内容=`t`
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@ description: 从 stdin 读一行;可选提示。演示数据写在 frontmatter
|
||||
|
||||
内置「输入」读一行。演示与 marqdo view / 静态导出可在 frontmatter 写「输入:」(或 stdin:)。CLI 也可用管道或 --stdin-file。Live view 可用 Preset input 覆盖。
|
||||
|
||||
*`名字` = > 输入 提示=名字: *
|
||||
*`名字` = > 输入 提示="名字:"*
|
||||
|
||||
> 打印 内容=你好 `名字`!
|
||||
@@ -10,7 +10,7 @@ Import lib/fs.mq.md. Functions: read_text, write_text, append_text, exists, list
|
||||
|
||||
Bare path words must not contain a slash character (parsed as division). Prefer a same-folder name or a variable.
|
||||
|
||||
*`ok` = > fs.exists path=demo.txt *
|
||||
*`ok` = > fs.exists path="demo.txt"*
|
||||
|
||||
1. `ok`
|
||||
> print text=demo-present
|
||||
|
||||
@@ -21,18 +21,18 @@ Plotting (already in the library): plot / plot_points / plot_conic return SVG te
|
||||
|
||||
diff / simplify / expand / partial subs return formula values so you can chain (e.g. differentiate twice, then plot or eval).
|
||||
|
||||
*`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`
|
||||
|
||||
*`_svg` = > math.plot formula=`f` var=x min=-3 max=3 *
|
||||
*`_svg` = > math.plot formula=`f` var="x" min=-3 max=3*
|
||||
|
||||
> print text=plot-ok
|
||||
@@ -8,6 +8,6 @@ import net:lib/net.mq.md
|
||||
|
||||
Import lib/net.mq.md. Functions: http_get, http_post, http_post_sse, openai_sse_parse, http_request, url_encode. HTTPS and optional headers= map are supported. Default post content-type is JSON. `http_post_sse` / `openai_sse_parse` return OpenAI chat stream event lists (`delta` / `done`).
|
||||
|
||||
*`e` = > net.url_encode text=hello world *
|
||||
*`e` = > net.url_encode text="hello world"*
|
||||
|
||||
> print text=`e`
|
||||
@@ -8,7 +8,7 @@ import table:lib/table.mq.md
|
||||
|
||||
Prefer `table.put` for element updates (`at=` text key, **1-based** int, or list path). Use `json` for parse/stringify only.
|
||||
|
||||
*`h` = > table.put in=None at=Authorization value=Bearer-demo*
|
||||
*`h` = > table.put in=None at="Authorization" value="Bearer-demo"*
|
||||
|
||||
`xs` =
|
||||
|
||||
@@ -17,7 +17,7 @@ Prefer `table.put` for element updates (`at=` text key, **1-based** int, or list
|
||||
| a |
|
||||
| b |
|
||||
|
||||
*`xs` = > table.put in=`xs` at=1 value=A*
|
||||
*`xs` = > table.put in=`xs` at=1 value="A"*
|
||||
*`n` = > table.rows xs=`xs`*
|
||||
|
||||
> print text=`h`[^Authorization]
|
||||
|
||||
@@ -8,12 +8,12 @@ import text:lib/text.mq.md
|
||||
|
||||
Import lib/text.mq.md. Functions: str_trim(s), str_split(s, sep), str_join(xs, sep).
|
||||
|
||||
*`t` = > text.str_trim s= marqdo *
|
||||
*`t` = > text.str_trim s=" marqdo "*
|
||||
|
||||
> print text=`t`
|
||||
|
||||
*`parts` = > text.str_split s=a,b,c sep=,*
|
||||
*`parts` = > text.str_split s="a,b,c" sep=","*
|
||||
|
||||
*`j` = > text.str_join xs=`parts` sep=-*
|
||||
*`j` = > text.str_join xs=`parts` sep="-"*
|
||||
|
||||
> print text=`j`
|
||||
@@ -21,18 +21,18 @@ $$
|
||||
|
||||
求导 / 化简 / 展开 / 未完全数值化的代入仍返回 formula,可继续链式调用(例如求二阶导后再绘图或求值)。
|
||||
|
||||
*`ty` = > type `f` *
|
||||
*`ty` = > type `f`*
|
||||
|
||||
> print text=`ty`
|
||||
|
||||
*`df` = > 数学.求导 formula=`f` var=x *
|
||||
*`df` = > 数学.求导 formula=`f` var="x"*
|
||||
|
||||
> print text=`df`
|
||||
|
||||
*`roots` = > 数学.求解 formula=`f` var=x *
|
||||
*`roots` = > 数学.求解 formula=`f` var="x"*
|
||||
|
||||
> print text=`roots`
|
||||
|
||||
*`_svg` = > 数学.绘图 formula=`f` var=x min=-3 max=3 *
|
||||
*`_svg` = > 数学.绘图 formula=`f` var="x" min=-3 max=3*
|
||||
|
||||
> print text=plot-ok
|
||||
@@ -10,7 +10,7 @@ description: 沙箱内读写文本
|
||||
|
||||
裸路径字面量不要写斜杠(会被当成除法)。可用同目录文件名或变量。
|
||||
|
||||
*`ok` = > 文件.存在 路径=demo.txt *
|
||||
*`ok` = > 文件.存在 路径="demo.txt"*
|
||||
|
||||
1. `ok`
|
||||
> 打印 内容=有演示文件
|
||||
|
||||
@@ -8,12 +8,12 @@ description: 去空白、拆分、拼接
|
||||
|
||||
导入 lib/文本.mq.md。函数:去空白(s)、拆分(s, sep)、拼接(xs, sep)。
|
||||
|
||||
*`t` = > 文本.去空白 s= marqdo *
|
||||
*`t` = > 文本.去空白 s=" marqdo "*
|
||||
|
||||
> 打印 内容=`t`
|
||||
|
||||
*`parts` = > 文本.拆分 s=甲,乙,丙 sep=,*
|
||||
*`parts` = > 文本.拆分 s="甲,乙,丙" sep=","*
|
||||
|
||||
*`j` = > 文本.拼接 xs=`parts` sep=-*
|
||||
*`j` = > 文本.拼接 xs=`parts` sep="-"*
|
||||
|
||||
> 打印 内容=`j`
|
||||
@@ -8,6 +8,6 @@ description: HTTP(S) 与地址编码
|
||||
|
||||
导入 lib/网络.mq.md。函数:获取(地址)、提交(地址, 内容;可选 content_type / headers)、编码地址(内容)。支持 HTTP 与 HTTPS(ureq)。
|
||||
|
||||
*`e` = > 网络.编码地址 内容=你好 *
|
||||
*`e` = > 网络.编码地址 内容="你好"*
|
||||
|
||||
> 打印 内容=`e`
|
||||
@@ -8,7 +8,7 @@ description: "# Child = > Parent; methods walk the base chain"
|
||||
## hello
|
||||
+ `who`
|
||||
|
||||
*`msg` = "Hello, `who`!" *
|
||||
*`msg` = "Hello, `who`!"*
|
||||
**`msg`**
|
||||
|
||||
# Loud = > Greeter
|
||||
@@ -16,14 +16,14 @@ description: "# Child = > Parent; methods walk the base chain"
|
||||
## hello
|
||||
+ `who`
|
||||
|
||||
*`msg` = "HELLO, `who`!" *
|
||||
*`msg` = "HELLO, `who`!"*
|
||||
**`msg`**
|
||||
|
||||
# main
|
||||
|
||||
*`g` = > Greeter *
|
||||
*`m` = > `g`.hello who=world *
|
||||
*`g` = > Greeter*
|
||||
*`m` = > `g`.hello who="world"*
|
||||
> print text=`m`
|
||||
*`l` = > Loud *
|
||||
*`m2` = > `l`.hello who=world *
|
||||
*`l` = > Loud*
|
||||
*`m2` = > `l`.hello who="world"*
|
||||
> print text=`m2`
|
||||
@@ -8,7 +8,7 @@ description: "# 子类 = > 父类;方法沿基类链查找"
|
||||
## 你好
|
||||
+ `谁`
|
||||
|
||||
*`msg` = "你好,`谁`!" *
|
||||
*`msg` = "你好,`谁`!"*
|
||||
**`msg`**
|
||||
|
||||
# 大声 = > 问候者
|
||||
@@ -16,14 +16,14 @@ description: "# 子类 = > 父类;方法沿基类链查找"
|
||||
## 你好
|
||||
+ `谁`
|
||||
|
||||
*`msg` = "你好,`谁`!!!" *
|
||||
*`msg` = "你好,`谁`!!!"*
|
||||
**`msg`**
|
||||
|
||||
# main
|
||||
|
||||
*`g` = > 问候者 *
|
||||
*`m` = > `g`.你好 谁=世界 *
|
||||
*`g` = > 问候者*
|
||||
*`m` = > `g`.你好 谁="世界"*
|
||||
> 打印 内容=`m`
|
||||
*`l` = > 大声 *
|
||||
*`m2` = > `l`.你好 谁=世界 *
|
||||
*`l` = > 大声*
|
||||
*`m2` = > `l`.你好 谁="世界"*
|
||||
> 打印 内容=`m2`
|
||||
Reference in new issue
Block a user