hermes - 💡(How to fix) Fix feat(feishu): support markdown tables via CardKit table element

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Solution

Detect markdown tables in message content using a regex pattern (^\|.*\|\n\|[-|: ]+\|) and route them to the Feishu CardKit table element instead of post.

Code Example

## 基金业绩

| 基金名称 | 近一年收益 |
|---------|-----------|
| 信澳业绩驱动混合C | +338.86% |
RAW_BUFFERClick to expand / collapse

Problem

Feishu post type messages do not render markdown tables — they display as raw text with | characters. Users sending table-formatted data (e.g., fund performance summaries, monitoring data) get unreadable output.

Solution

Detect markdown tables in message content using a regex pattern (^\|.*\|\n\|[-|: ]+\|) and route them to the Feishu CardKit table element instead of post.

Changes

  • parse_markdown_table() — parses markdown table string into (columns, rows) tuples for CardKit consumption
  • _build_ordered_blocks() — splits message into text and table blocks, preserving order
  • send_card_table() — async method to send a CardKit card with a table element (header + data rows)
  • send_text() override — detects tables in formatted content, builds a combined CardKit card (markdown sections + table element in order), falls back to plain text if table parsing fails

Example

Input:

## 基金业绩

| 基金名称 | 近一年收益 |
|---------|-----------|
| 信澳业绩驱动混合C | +338.86% |

Output: A CardKit card with a blue header and a rendered Feishu table.

Backwards Compatibility

  • Non-table messages unchanged
  • If table parsing fails, falls back to plain text send

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING