Skip to content

fix(weixin): preserve native markdown rendering - #10338

Closed
bernylinville wants to merge 1 commit into
NousResearch:mainfrom
bernylinville:fix/weixin-preserve-markdown-rendering
Closed

fix(weixin): preserve native markdown rendering#10338
bernylinville wants to merge 1 commit into
NousResearch:mainfrom
bernylinville:fix/weixin-preserve-markdown-rendering

Conversation

@bernylinville

Copy link
Copy Markdown
Contributor

Summary

  • preserve raw Markdown in the Weixin adapter instead of rewriting tables, headings, and links
  • keep Markdown tables and headings together during Weixin message chunking
  • update Weixin tests and docs to reflect native Markdown rendering

Root cause

The Weixin adapter assumed WeChat could not render Markdown well, so format_message() rewrote outgoing content before delivery:

  • tables were converted into pseudo key/value lists
  • headings were rewritten into custom plain-text variants
  • markdown links were rewritten/stripped

That behavior now degrades real Weixin output because the current client can render Markdown tables natively.

Testing

  • source venv/bin/activate && python -m pytest tests/gateway/test_weixin.py -q

Closes #10308

- stop rewriting markdown tables, headings, and links before delivery
- keep markdown table blocks and headings together during chunking
- update Weixin tests and docs for native markdown rendering

Closes NousResearch#10308
@teknium1

Copy link
Copy Markdown
Contributor

Merged as part of Batch-3 salvage: #11571

Your commit cherry-picked onto main (rewrote the author line to your GitHub identity bernylinville@devopsthink.org since the original commit had placeholder Your Name <your-email@example.com>). The change has community backing across #7468, #7617, and #9612 — all reporting that the legacy rewriting degrades modern WeChat output. Low-risk fallback if any client variant doesn't render markdown natively. Thanks for the systematic test + docs update.

Commit SHAs on main: 6ee65b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weixin adapter still rewrites Markdown tables/headers/links instead of preserving native WeChat Markdown rendering

2 participants