refactor: move encode HTML function into separate module#4591
Merged
qwerty541 merged 1 commit intoOct 17, 2025
Merged
Conversation
|
@qwerty541 is attempting to deploy a commit to the github readme stats Team on Vercel. A member of the Team first needs to authorize it. |
qwerty541
approved these changes
Oct 17, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase by extracting the encodeHTML function from src/common/render.js into a new dedicated module src/common/html.js. This improves code organization by separating HTML encoding utility from rendering logic.
Key Changes
- Created new
src/common/html.jsmodule containing theencodeHTMLfunction - Updated all import statements across the codebase to reference the new module location
- Removed
encodeHTMLexport fromsrc/common/render.jsandsrc/common/index.js
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/common/html.js | New module containing the extracted encodeHTML function with its documentation |
| src/common/render.js | Removed encodeHTML function definition and export, added import from new module |
| src/common/index.js | Removed encodeHTML re-export |
| src/common/Card.js | Updated import to reference new html.js module, added type checking comment |
| src/common/fmt.js | Updated import path for encodeHTML |
| src/translations.js | Updated import path for encodeHTML |
| src/cards/repo.js | Reorganized imports to separate encodeHTML import from render utilities |
| src/cards/gist.js | Reorganized imports to separate encodeHTML import from render utilities |
| tests/render.test.js | Split import statement to reflect new module structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
harryzcy
pushed a commit
to harryzcy/github-readme-stats
that referenced
this pull request
Oct 18, 2025
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
pull Bot
pushed a commit
to T0biii/github-readme-stats
that referenced
this pull request
Oct 18, 2025
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
martin-mfg
pushed a commit
to stats-organization/github-stats-extended
that referenced
this pull request
Nov 2, 2025
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
ghosind
pushed a commit
to ghosind/github-readme-stats
that referenced
this pull request
Dec 30, 2025
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
zimya
pushed a commit
to zimya/github-readme-stats-cf
that referenced
this pull request
Jan 13, 2026
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
piscis
pushed a commit
to piscis/github-readme-stats
that referenced
this pull request
Feb 7, 2026
…#4591) Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.