Add table extension to mdConverter goldmark renderer#498
Open
savtrip wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds Markdown table support to the rich-text Markdown→HTML converter.
Changes:
- Enable Goldmark’s
extension.Tablealongsideextension.Strikethrough
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // mdConverter is the goldmark Markdown-to-HTML converter configured for Trix compatibility. | ||
| var mdConverter = goldmark.New( | ||
| goldmark.WithExtensions(extension.Strikethrough), | ||
| goldmark.WithExtensions(extension.Strikethrough, extension.Table), |
Member
|
Thanks for this. Just wanted to drop a note that the eventual goal is to have markdown conversion done server-side (not in the CLI). But that's going to be a few more weeks at least, so it may make sense to add this client-side for now. I'll defer to @jeremy! |
Author
|
No worries Mike, thanks for the explanation, I was wondering why the conversion was done locally instead of server-side, makes sense now. Appreciate your help, have a great day. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 checkpassesI 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
Markdown
Summary by cubic
Enable Markdown table rendering by adding the
goldmarktable extension to the Markdown-to-HTML converter. Tables in rich text now render as HTML instead of showing raw Markdown.Written for commit 612b3f8. Summary will update on new commits.