-
Notifications
You must be signed in to change notification settings - Fork 24
fix(visual): truncate headings, escape HTML in orama #460
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR fixes visual issues in the documentation by escaping HTML characters in Orama search results and preventing heading overflow with ellipsis truncation.
- Adds HTML entity escaping for
<and>characters to prevent Orama from interpreting them as HTML - Implements CSS truncation for long headings in the documentation UI
- Updates
transformNodeToStringandtransformNodesToStringfunctions to support optional HTML entity escaping
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/utils/unist.mjs | Added escapeHTMLEntities function and optional escape parameter to node transformation functions |
| src/generators/web/ui/index.css | Added CSS rules to truncate headings with ellipsis and prevent overflow |
| src/generators/orama-db/index.mjs | Updated to pass true for HTML entity escaping when generating Orama descriptions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #460 +/- ##
==========================================
- Coverage 74.55% 74.54% -0.01%
==========================================
Files 107 107
Lines 10466 10479 +13
Branches 684 686 +2
==========================================
+ Hits 7803 7812 +9
- Misses 2661 2664 +3
- Partials 2 3 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Ref: #455
This PR:
<and>on theorama-dbgenerator, as Orama interprets them as HTML