fix: resolve hero code demo syntax highlighting issue#486
fix: resolve hero code demo syntax highlighting issue#486HimasreeKolathur24 wants to merge 2 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
👋 Thanks for opening a PR, @HimasreeKolathur24!Your PR has entered the 🚦 PR Review Pipeline.
What happens next
A pipeline status comment will appear below and update automatically as your PR progresses. While you wait
This comment is posted only once. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe ChangesHero Code Demo Syntax Highlighting Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@modules/home/code-line.tsx`:
- Around line 22-55: The current tokenization uses line.split(/(\s+)/) which
keeps punctuation attached (e.g., "Editron({", "editor.launch();",
"'`@editron/core`';") so KEYWORDS, string checks and the special identifier check
(["Editron","editor","console"]) miss matches; update tokenization in the parts
creation (replace the line.split call) to use a regex that separately captures
quoted strings, identifiers, and punctuation OR normalize each part before
matching (trim surrounding punctuation like (){};.,) so comparisons against
KEYWORDS, the string-start/end checks, and the identifier list succeed; ensure
this change is applied where parts is defined and that parts.map logic (the
KEYWORDS check, the string literal check, and the ["Editron","editor","console"]
check) uses the normalized token for comparisons while still rendering the
original part so spacing/punctuation is preserved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e1f74d2a-34ae-4142-86f1-488eddea8d72
📒 Files selected for processing (1)
modules/home/code-line.tsx
piyushdotcomm
left a comment
There was a problem hiding this comment.
Can you remove the claude opus 3 model as we don't offer that
Better to add any free model such as deepseak or kwen
@piyushdotcomm, |
Summary
Fixed a rendering issue in the Hero Code Demo where Tailwind utility classes were displayed as visible text inside the code block.
Changes Made
dangerouslySetInnerHTML.Type of change
Related issue
Closes #485
Validation
List any additional manual verification you performed:
Screenshots or recordings
#Before

#After Fix

Checklist
Summary by CodeRabbit