-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formatter: add buffer that records both data and push/pop_label() calls
Template functions like indent() or fill() need to manipulate labeled output. Since indent() is line oriented, it could be implemented as a post-processing filter. OTOH, fill()/wrap() inserts additional "\n"s. If we do that as a post process, colorized text could be split into multiple lines, and would mess up graph log output. By using FormatRecorder, we can apply text formatting in between labels. I thought we could disallow text wrapping of labeled template fragments, but the example in #1043 suggests that we do want to wrap(whole_template_output) rather than simple description.wrap().
- Loading branch information
Showing
1 changed file
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters