Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #17
This is by no means a perfect minifier, but it's simple and certainly good enough for most cases you'll see with ANSI styling
This PR stubs a minifier in between munching the ANSI codes / text and converting it to HTML. The minifier works by condensing all of the input into tidy chains of text and ANSI codes. Then it runs a pass over all the input and discards any runs of ANSI codes that wind up with the same style as the last set
There's a snapshot test included that should act as a good demo. The input text was taken from running the following with some manual replace-all'ing of the ANSI codes to get a more human readable format
sample.tao