Skip to content

Conversation

@onevcat
Copy link
Owner

@onevcat onevcat commented Jul 19, 2025

Summary

  • Implemented strikethrough style support for Rainbow library
  • Added comprehensive test coverage for the new strikethrough feature
  • Updated Playground with strikethrough examples

Changes

  1. String+Rainbow.swift: Added strikethrough computed property that applies ANSI code 9 for strikethrough text styling
  2. ConsoleStringTests.swift: Added comprehensive tests including:
    • Basic strikethrough functionality
    • Strikethrough combined with colors
    • Strikethrough in style chains
    • Raw string extraction with strikethrough
  3. Playground: Added examples demonstrating strikethrough usage both standalone and combined with other styles

Test Plan

All tests pass successfully. The strikethrough style has been tested:

  • As a standalone style
  • Combined with foreground colors
  • Combined with background colors
  • In complex style chains
  • With raw string extraction

onevcat added 2 commits July 19, 2025 13:39
- Add strikethrough property to String+Rainbow.swift
- Add comprehensive tests for strikethrough style in ConsoleStringTests
- Test basic strikethrough application
- Test chaining with colors and other styles
- Test clearing strikethrough with clearStyles
- Add basic strikethrough usage examples
- Show combination with other styles (bold, italic, underline)
- Add practical examples (deprecated methods, price updates, TODO lists)
- Demonstrate various use cases for strikethrough style
@onevcat onevcat merged commit d9bb731 into master Jul 19, 2025
2 checks passed
@onevcat onevcat deleted the feature/strikethrough-tests branch July 19, 2025 12:49
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