Skip to content

Conversation

@Soxasora
Copy link
Member

@Soxasora Soxasora commented Dec 24, 2025

Description

Context https://stacker.news/items/1371376
Adds a fallback visitor for HTML tags that creates a plain TextNode instead of going to the unrecognized markdown construct route and create a whole paragraph.

Screenshots

Before:
image

After:
image

Checklist

Are your changes backward compatible? Please answer below:

For example, a change is not backward compatible if you removed a GraphQL field or dropped a database column.
Yes
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
n/a

Did you introduce any new environment variables? If so, call them out explicitly here:
no

Did you use AI for this? If so, how much did it assist you?
no


Note

Implements a plain-text fallback for mdast html nodes to avoid creating standalone paragraphs for unrecognized tags.

  • Adds MdastHtmlFallbackVisitor that appends a TextNode with parent formatting for any html node
  • Updates formattingVisitors order to run specific HTML tag visitors (sup, sub) before the fallback

Written by Cursor Bugbot for commit 0931cef. This will update automatically on new commits. Configure here.

@huumn huumn merged commit f122134 into stackernews:master Dec 24, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants