Skip to content

Handle nested style tags#567

Closed
Blacksmoke16 wants to merge 1 commit intomasterfrom
more-robust-coloring
Closed

Handle nested style tags#567
Blacksmoke16 wants to merge 1 commit intomasterfrom
more-robust-coloring

Conversation

@Blacksmoke16
Copy link
Member

Context

Refactors ACON::Formatter::OutputStyle to not delegate to stdlib's Colorize module for now. If/when crystal-lang/crystal#16052 is merged/released we can go back to leveraging it. But for now, this PR gives the same benefit w/o having to wait for the next release.

This change allows for leveraging nested style tags, E.g.

output.puts "<error>some <info>some info</info> error</error>"
output.puts "<error>error<info>info<comment>comment</info>error</error>"

Would previously render as:
image

But now correctly renders as:
image

(Second one just so happened to work in both cases)

Changelog

  • Add support for nested style tags

Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

@Blacksmoke16 Blacksmoke16 added component:console kind:enhancement New functionality to an existing feature labels Aug 3, 2025
@Blacksmoke16
Copy link
Member Author

Closing in favor of #568.

@Blacksmoke16 Blacksmoke16 deleted the more-robust-coloring branch August 3, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:console kind:enhancement New functionality to an existing feature

Development

Successfully merging this pull request may close these issues.

1 participant