You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(svg): pulse today's tile even when commit count is zero (JhaSourav07#1666)
## Description
FixesJhaSourav07#1659
In `lib/svg/generator.ts`, a local `sanitizeFont` helper was redefined
inside both `generateMonthlySVG` and `generateAutoThemeMonthlySVG`
functions instead of reusing the global `sanitizeFont` already imported
from `./sanitizer`. The local regex (`/[^a-zA-Z0-9\s-]/g`) was also
inconsistent with the global one (`/[^a-zA-Z0-9\s\-']/g`), stripping out
single quotes and potentially breaking custom fonts like `'Courier
New'`.
**Changes made:**
- Removed the redundant local `sanitizeFont` definitions inside
`generateMonthlySVG` and `generateAutoThemeMonthlySVG`
- Both functions now use the shared `sanitizeFont` utility from
`./sanitizer`
- Font sanitization is now consistent across all SVG rendering functions
## Pillar
- [ ] 🎨 Pillar 1 — New Theme Design
- [ ] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
No visual change — this is a code quality and consistency fix.
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=Pranav-IIITM`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
- [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
- [ ] I have updated `README.md` if I added a new theme or URL
parameter.
- [x] I have started the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [ ] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (no raw elements, smooth animations, correct fonts).
- [x] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.
0 commit comments