New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Star-search md rendering renders spacing from LLM #3326
Conversation
Signed-off-by: John McBride <john@opensauced.pizza>
✅ Deploy Preview for oss-insights ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for design-insights ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I also came across this plugin: https://github.com/remarkjs/remark-breaks which would add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed one change, but this is good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better.
## [2.25.0-beta.3](v2.25.0-beta.2...v2.25.0-beta.3) (2024-05-07) ### 🐛 Bug Fixes * Star-search md rendering renders spacing from LLM ([#3326](#3326)) ([7bf27f1](7bf27f1))
Signed-off-by: John McBride <john@opensauced.pizza> Co-authored-by: Nick Taylor <nick@nickyt.co>
## [2.25.0](v2.24.2...v2.25.0) (2024-05-07) ### 🐛 Bug Fixes * Change announcement card on highlight feed to starsearch ([#3313](#3313)) ([a38af76](a38af76)) * Star-search md rendering renders spacing from LLM ([#3326](#3326)) ([7bf27f1](7bf27f1)) * style and layout fixes for StarSearch ([#3304](#3304)) ([599d8f6](599d8f6)) ### 🍕 Features * Issues and PR charts for Repo pages ([#3323](#3323)) ([97a6239](97a6239)) * search and select for workspaces in sidebar ([#3307](#3307)) ([5d91aaf](5d91aaf)) * uniform styling for Repo page charts ([#3306](#3306)) ([9cd008e](9cd008e))
Description
This adds 2 things primarily to the star-search markdown rendering:
data:
frames are counted as newlines from the model. This is done by making the\s
spacing capture in the regex optional and not forcing a capture in theresults
capture-group via.+
: instead, we allow for any captures (including zero) through.*
.This also changes
Markdown
-->ReactMarkdown
. This seems to be the way the library recommends rendering "safe" markdown that can't have code injected into it: https://www.npmjs.com/package/react-markdown/v/8.0.6I also noticed what seems to be some improvements to the rendering of the markdown switching to
ReactMarkdown
.Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Before:
After:
Steps to QA
Tier (staff will fill in)
[optional] What gif best describes this PR or how it makes you feel?