fix(visual): truncate headings, escape HTML in orama#460
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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