Skip to content

Conversation

@avivkeller
Copy link
Member

Ref: #455

This PR:

  • Escapes < and > on the orama-db generator, as Orama interprets them as HTML
  • Truncates headings and adds an ellipsis if they are too long

Copilot AI review requested due to automatic review settings October 12, 2025 15:25
@avivkeller avivkeller requested a review from a team as a code owner October 12, 2025 15:25
@vercel
Copy link

vercel bot commented Oct 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
api-docs-tooling Ready Ready Preview Oct 12, 2025 3:43pm

Copy link
Contributor

Copilot AI left a 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 transformNodeToString and transformNodesToString functions 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
Copy link

codecov bot commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.54%. Comparing base (3291812) to head (f8f86b4).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/unist.mjs 78.94% 3 Missing and 1 partial ⚠️
src/generators/orama-db/index.mjs 0.00% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

avivkeller and others added 3 commits October 12, 2025 11:26
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>
@avivkeller avivkeller merged commit 76e62f7 into main Oct 16, 2025
19 checks passed
@avivkeller avivkeller deleted the visual-issues branch October 16, 2025 13:53
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.

6 participants