fix(readme): decode HTML entities in TOC dropdown labels#1550
fix(readme): decode HTML entities in TOC dropdown labels#1550andrii-bodnar wants to merge 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThe ReadmeTocDropdown.vue component has been updated to decode HTML entities in text rendering. An import for the decodeHtmlEntities utility function was added, and the component's template now applies this function to text values across the table of contents dropdown items at multiple nesting levels. The change is limited to text transformation with no modifications to component logic, control flow, or event handling. Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hello, and thank you for creating such a great tool. It's now my go-to way of exploring NPM packages!
I noticed a small bug in the ToC dropdown. It shows
&for headings that containes&(and similarly for other HTML entities like<,", etc.).For example: https://npmx.dev/package/@lingui/core#readme

The dropdown displays the
Installation & Usageoption instead ofInstallation & Usage.In this PR, I added HTML entities decoding when rendering TOC labels in
ReadmeTocDropdownusing the existingdecodeHtmlEntitiesfunction from the formatters. Server-side decoding was tried but didn’t resolve the issue, so decoding is done in the component.Please let me know if this is the right fix.