refactor: consolidate block processing logic
Introduce a centralized `block-processor` and `block-scanner` to handle markdown fenced code blocks. This replaces the previous `inline-blocks.ts` and individual completion sources with a unified approach that handles block stripping, directive replacement, and metadata extraction (stats, templates, and spark tables) in a single pass.
This commit is contained in:
@@ -234,10 +234,10 @@ weather,天气,enum,晴天\|阴天\|雨天\|暴风雨
|
||||
|
||||
模板属性用于查表掷骰,例如年龄表、职业表等。
|
||||
|
||||
模板在独立的 CSV 代码块中定义,使用 `role=stat-template` 和 `file=模板名`。
|
||||
模板在独立的 CSV 代码块中定义,使用 `role=stat-template` 和 `id=模板名`。
|
||||
**第一列是骰子表达式**(如 `1d10`),第二列是 `label`,其余列为修饰符:
|
||||
|
||||
```csv role=stat-template file=年龄
|
||||
```csv id=年龄 role=stat-template
|
||||
1d10,label,heart,mind,strength,speed
|
||||
1-3,青少年,+20,-10,,
|
||||
4-7,成年,,-10,,+20
|
||||
|
||||
Reference in New Issue
Block a user