feat: Refactor DOT graph sanitization and enhance testing#18
Merged
Conversation
- Introduced a new module `dotSanitizer.ts` for sanitizing DOT graph content, including special character encoding and syntax fixes. - Replaced the previous inline `sanitizeDotContent` function with modular functions for better maintainability. - Updated `extension.ts` to utilize the new sanitization functions and improved error handling during graph rendering. - Enhanced `graphPreview.ts` to provide better error messages and status updates during graph rendering. - Added comprehensive tests for the new sanitization functions in `dotContentSanitizer.test.ts`, covering various edge cases and validation scenarios. - Updated `package.json` to include new dev dependencies and scripts for testing and compilation. - Removed unused dependencies and code related to `sanitize-html`. - Created a new `.vscode/tasks.json` for easier task management in the development environment.
…ments and error handling
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.
dotSanitizer.tsfor sanitizing DOT graph content, including special character encoding and syntax fixes.sanitizeDotContentfunction with modular functions for better maintainability.extension.tsto utilize the new sanitization functions and improved error handling during graph rendering.graphPreview.tsto provide better error messages and status updates during graph rendering.dotContentSanitizer.test.ts, covering various edge cases and validation scenarios.package.jsonto include new dev dependencies and scripts for testing and compilation.sanitize-html..vscode/tasks.jsonfor easier task management in the development environment.