Skip to content

v1.1.0: Comment Preservation Feature

Latest

Choose a tag to compare

@SimonCalundan SimonCalundan released this 07 Feb 22:27

Code Anonymizer v1.1.0

New Features

  • Added comment preservation functionality
    • New option --preserve-comments to maintain original code comments (defaults to true)
    • Support for single-line, multi-line, and block comments
    • Handles comments containing code-like text without anonymizing their content
    • Properly preserves comment placement and formatting

Improvements

  • Enhanced string literal handling to work seamlessly with comment preservation
  • Added comprehensive test cases for comment handling
  • Updated documentation to reflect new comment preservation options

Documentation

  • Updated README with new option flags

Technical Details

  • Implemented robust comment extraction and preservation logic
  • Added safeguards to prevent comment content from being anonymized
  • Improved pattern matching to distinguish between code and comments