Repository navigation
feat(templateManager): add replaceTemplateLine function and unit tests - #186
Merged
Merged
Conversation
taosin
commented
Jan 26, 2026
Contributor
- Implemented replaceTemplateLine function to manage template and infographic lines in syntax text, ensuring valid output and preserving indentation.
- Added comprehensive unit tests for replaceTemplateLine to cover various scenarios, including empty inputs, template updates, and indentation preservation.
- Refactored EditorPanel to utilize the new templateManager for template line replacements.
- Implemented replaceTemplateLine function to manage template and infographic lines in syntax text, ensuring valid output and preserving indentation. - Added comprehensive unit tests for replaceTemplateLine to cover various scenarios, including empty inputs, template updates, and indentation preservation. - Refactored EditorPanel to utilize the new templateManager for template line replacements.
Contributor
|
/gemini review |
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new replaceTemplateLine function in its own templateManager.ts file, along with comprehensive unit tests. The EditorPanel component is then refactored to use this new centralized function. The implementation is functionally correct and well-tested. My main feedback is to refactor the replaceTemplateLine function to remove some code duplication, which will improve its readability and maintainability. Overall, this is a good refactoring that improves code organization.
Aarebecca
approved these changes
Jan 27, 2026
Aarebecca
approved these changes
Jan 27, 2026
Contributor
|
@taosin This helps a ton. 🎁 |
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.