ratatui / ansi-to-tui

Convert ansi colored text to tui::text::Text
https://crates.io/crates/ansi-to-tui
MIT License
57 stars 21 forks source link

Fix style resets #38

Closed 9999years closed 8 months ago

9999years commented 8 months ago

ansi-to-tui translates \x1b[0m as Style::default() and then updates the "running style" with style.patch, but style.patch(Style::default()) == style, so no change is made. This leads to subtle issues where colors and style modifiers are erroneously reintroduced after reset sequences.

This is simple to fix by translating \x1b[0m as Style::reset() instead.

uttarayan21 commented 8 months ago

Thank you for the PR