Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring Request: Improve Parser.ts Readability and Maintainability #3503

Closed
wants to merge 2 commits into from

Conversation

MatMyfta
Copy link

Summary: This is purely a code refactoring request.

I noticed that the current implementation has several instances of code repetition. To improve the overall readability and maintainability, I propose a refactor that eliminates these repetitions and makes the code more modular. This should help future developers understand the logic more easily and facilitate further modifications without unnecessary complexity.

All the tests have been run and pass.

Goal: The main objective is to clean up repetitive code and make it more concise and readable, without changing the existing functionality.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2024 5:28pm

@UziTech
Copy link
Member

UziTech commented Oct 26, 2024

Code readability is very subjective. I don't feel like this is more readable to me. Also this only saves about 10 lines of code, so there doesn't seem to be too much duplication.

Typically removing duplication when the code is only duplicated once is not very helpful. If it was many places and saved hundreds of lines of code I would say it is worth it.

Thanks for trying to make it better though 💯

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.

2 participants