Add table extension to mdConverter goldmark renderer

Merged
SA
4mo ago
+252-4

What

Hi guys,

This adds the goldmark table extension for rendering markdown tables to HTML that lexxy now supports in bc5.

Here are the docs for the table extension that I added: https://pkg.go.dev/github.com/yuin/goldmark#readme-built-in-extensions

Why

My agent was adding tables to descriptions of cards and todos (any rich text area) but I noticed the table was not rendering but instead showed the raw markdown.

Therefore, I looked into the code and discovered there was no table extension for goldmark (refer to the docs I linked above to see the table extension). Also, I noticed from the comment it says:

// mdConverter is the goldmark Markdown-to-HTML converter configured for Trix compatibility.

Therefore, I assume the team has not optimised for lexxy yet given it says Trix.

If my agent renders everything in HTML then the table works fine. But sometimes it chooses to do it in markdown and therefore I end up having the raw markdown content in my rich text (which obviously looks terrible lol).

If for whatever reason you guys aren't happy with the change then writing something in the SKILL file to say "Note: tables will not render if provided in markdown because the CLI does not convert them to HTML" would at least signal to the agent that it's not possible.

Testing

  • make check passes

I did not add any test cases in. I performed a cli test of adding a card and it worked successful. I did not want to add tests because I wanted to check if this was a change you guys were happy with.

EDIT: Screenshots

I added the screenshots below to show the problem in basecamp.

HTML

screenshot-2026-06-11-at-12-43-23

Markdown

screenshot-2026-06-11-at-12-42-44

Summary by cubic

Enable Markdown table rendering by adding the goldmark table extension; tables now render as HTML with align attributes so GFM alignment survives BC3 sanitization.

Also improves detection and safety: table-only Markdown is detected via the AST with a fast pre-check to skip parsing when no | or newline, IsHTML recognizes

, TUI editors refuse table-bearing content to prevent data loss, and HTML detection now also matches self-closing
; Basecamp skill docs updated.