feat(dingtalk): normalize wide tables into grouped lists on final card

This commit is contained in:
姚章浩
2026-09-11 19:56:32 +08:00
parent 16aa981028
commit b49cb5eaf9
3 changed files with 292 additions and 2 deletions
+2 -2
View File
@@ -629,7 +629,7 @@ func (h *Handler) finalizeCardOrMarkdown(ctx context.Context, webhookURL string,
func (h *Handler) rewriteOutboundContent(ctx context.Context, content string) string {
if h.outboundRewriter == nil {
return sanitizeDisplayAnswer(content)
return normalizeWideMarkdownTables(sanitizeDisplayAnswer(content))
}
timeout := h.finalDeliveryTimeout
if timeout <= 0 {
@@ -637,7 +637,7 @@ func (h *Handler) rewriteOutboundContent(ctx context.Context, content string) st
}
rewriteCtx, cancel := context.WithTimeout(context.WithoutCancel(ctx), timeout)
defer cancel()
return sanitizeDisplayAnswer(h.outboundRewriter.Rewrite(rewriteCtx, content))
return normalizeWideMarkdownTables(sanitizeDisplayAnswer(h.outboundRewriter.Rewrite(rewriteCtx, content)))
}
func (h *Handler) sanitizeOutboundPartial(content string) string {