chore: baseline md-preview 1.4.2 + agent workspace

This commit is contained in:
2026-10-21 16:06:27 +08:00
commit f63aff47a8
30 changed files with 15085 additions and 0 deletions

86
agent/tests/fixtures/code-samples.md vendored Normal file
View File

@@ -0,0 +1,86 @@
# 代码配色样例
用于对比 highlight.js 主题:关键字、字符串、注释、类型、数字、内置函数、diff。
## C#
```csharp
using System;
public sealed class Profile
{
private readonly string _name;
public Profile(string name) => _name = name;
// 比较运算符必须保持字面量
public bool IsEmpty() => _name == null || _name.Length == 0;
public override string ToString() => $"Profile({_name})";
}
```
## Rust
```rust
#[derive(Debug, Clone)]
struct Config {
port: u16,
retries: usize,
}
fn main() {
let cfg = Config { port: 8080, retries: 3 };
println!("{cfg:?}"); // 调试输出
}
```
## JavaScript
```javascript
const items = [1, 2, 3].map((n) => n * 2);
function sum(a, b) {
return a + b; // 行注释
}
console.log(sum(1, 2), items);
```
## JSON
```json
{
"name": "md-preview",
"version": "1.4.2",
"offline": true,
"count": 39
}
```
## YAML
```yaml
version: 1
active: 0
tabs:
- D:\Scripts\md-preview\HANDOFF.md
- note.md
```
## PowerShell
```powershell
$env:CARGO_TARGET_DIR = Join-Path $env:TEMP 'mdp-scan-target'
Get-ChildItem -File | Where-Object { $_.Length -gt 1MB }
```
## Diff
```diff
- old line
+ new line
unchanged
```
## 行内代码
使用 `cargo test` 与 `build.ps1`;正文里的 ==高亮== 仍应生效,而 `==literal==` 不应高亮。

51
agent/tests/fixtures/long-headings.md vendored Normal file
View File

@@ -0,0 +1,51 @@
---
title: 折叠与长文测试
tags: [fixture, fold, headings]
---
# 一级标题 A
这是 A 的引导段落。用来验证一级标题折叠时,它下面的二级、三级内容是否一起收起。
## 二级 A-1
A-1 段落。包含 **粗体**、*斜体*、`inline code` 与 ==高亮==。
### 三级 A-1-1
- 列表项 1
- 列表项 2
- 嵌套项
#### 四级 A-1-1-1
> 引用块,用于检查折叠后的间距。
## 二级 A-2
| 列 1 | 列 2 | 列 3 | 列 4 |
|---|---|---|---|
| a | b | c | d |
### 三级 A-2-1
任务列表:
- [x] 已完成
- [ ] 未完成
# 一级标题 B
B 的正文。
## 二级 B-1
```rust
fn main() {
println!("hello");
}
```
## 二级 B-2
结尾段落。

16
agent/tests/fixtures/math-mermaid.md vendored Normal file
View File

@@ -0,0 +1,16 @@
# 数学与图表
行内公式 $E = mc^2$,块级公式:
$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$
```mermaid
flowchart LR
A[开始] --> B{判断}
B -->|是| C[执行]
B -->|否| D[结束]
```
前后各留一段文字,方便检查折叠与滚动。