Skip to content

Rendes a style without destroy previous ostream settings  #1

@randydu

Description

@randydu

The ostream previous settings should be rolled back after current style rendering.
Currently we use rang::style::reset after rendering which works fine for serialized styles but not work for embedded styles:

serialize rendering:
ostream << style-1 << style-2 << ...

embedded rendering:
ostream << style-1(style-2(style-3("hello"), "world"), "!");

The ostream setting PUSH / POP should be used to make sure the setting of outer style won't be destroyed by inner style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions