fix(view): do not turn documentation tables into call chips

Keep descriptive table labels non-callable and suppress call annotations on table blocks. This removes the collapsed call {步骤...} chip while preserving the table and the return 950 chips at the actual foreign/writeback calls.
This commit is contained in:
cflmy committed 2026-10-18 13:59:24 +08:00
1 parent 78922102e4
commit 4da07c1b26
3 files changed
+12 -6

No files matched your search

+2 -2
View File
@@ -25,8 +25,8 @@ For an exploratory or audit document, pair `foreign` with `lib/writeback`. `writ
| Step | What it does |
|------|--------------|
| foreign.run / foreign.session | Execute the foreign code and return a Marqdo value |
| writeback.record | Persist that value in a named slot |
| Foreign run / Foreign session | Execute the foreign code and return a Marqdo value |
| Writeback record | Persist that value in a named slot |
| git diff | Review the changed result like any other document change |
A real writeback in this page.
+2 -2
View File
@@ -25,8 +25,8 @@ import writeback:lib/writeback.mq.md
| 步骤 | 作用 |
|------|------|
| 外联.运行 / 外联.会话 | 执行外联代码并返回 Marqdo 值 |
| writeback.record | 把该值持久化到命名槽位 |
| 外联执行 / 外联会话 | 执行外联代码并返回 Marqdo 值 |
| 写回记录 | 把该值持久化到命名槽位 |
| git diff | 像审阅普通文档改动一样审阅结果 |
这一页本身就是完整示例。
+8 -2
View File
@@ -342,8 +342,14 @@ fn render_table_block(
html.push_str("</table>");
// Annots on first table line (bind of collection).
if let Some(list) = by_line.get(&first_line) {
if !list.is_empty() {
let owned: Vec<ViewAnnot> = list.iter().map(|a| (*a).clone()).collect();
// A table is already its own readable value; a call chip would collapse
// the whole collection into an ellipsis. Keep only non-call chips.
let owned: Vec<ViewAnnot> = list
.iter()
.filter(|a| a.kind != crate::view::annot::AnnotKind::Call)
.map(|a| (*a).clone())
.collect();
if !owned.is_empty() {
html.push_str(&render_annot_band(&owned, MAX_VISIBLE_ANNOTS));
}
}