Skip to content

Conversation

@jjasghar
Copy link
Contributor

Note: I did use cursor to make this.

I noticed that there was no support for markdown in the messages, this adds that feature.

Note: I did use cursor to make this.

I noticed that there was no support for markdown in the messages, this
adds that feature.

Signed-off-by: JJ Asghar <awesome@ibm.com>
@monorkin
Copy link
Contributor

monorkin commented Sep 15, 2025

Hey! Thank you for the PR.
Have you considered replacing Trix with Lexxy?
That would also give you Markdown support without any extra server-side logic and you'd get WYSIWHG.

@jjasghar
Copy link
Contributor Author

jjasghar commented Sep 15, 2025

@monorkin I gave it a shot, and it really broke everything. I was hoping to add just Markdown support, and Lexxy comes in with a bunch more dependencies and overhead. There seems to be a requirement for changes in the frontend too, so it's very heavy-weight to my original goal. (I was hoping to add **bold** and *italics* to some formatting of some of my messages.)

I understand if this isn't the direction y'all want to go, but it was an easy addition that didn't require such a high rewrite of dependent things.

@Lewiscowles1986
Copy link

It would be nice to have some form of plugin architecture so that things like this could become optional, and managed by some "admin"

@Lewiscowles1986
Copy link

I was about to come back and point at another PR which was for unfurling... #30 that has a really nice environment variable option. Because it's just content post-processing I'm now wondering if multiple hooks is the right option. A simple env var to enable / disable this would be great, and then remains unopinionated as to what can "enhance" content.

mdsakalu added a commit to mdsakalu/bonfire that referenced this pull request Jan 7, 2026
Based on basecamp#36, with these safety enhancements:

Security:
- filter_html: true - escapes raw HTML in user input
- safe_links_only: true - blocks javascript: links
- no_styles: true - prevents inline CSS injection
- rel: "noopener noreferrer" on links

Robustness:
- Better markdown pattern detection with word boundaries
- no_intra_emphasis: true - don't italicize_variable_names
- Skip auto_link for markdown content (prevents double-linking)
- Fix message_pusher for polymorphic creators (Agent vs User)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

3 participants