Redo of background colors to improve diff readability #690
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.
This is a complete rewrite of #286 on top of the current version of
difftastic
(with the exception of the last cargo update which is causing a compilation error for me #689).Previous Issues
Hopefully this addresses the issues that @Wilfred mentioned in the last pull request:
6
inVersion 0.6
) and delimiters (the(
beforereverse
) is missing: not sure about this, please let me know if you still see this issueThemes
This pull request lays the groundwork for theming of
difftastic
in the future. The missing piece here is the ability to parse theme information from a config file. Internally, the various styles are stored in aHashMap
and a lookup with fallback is performed when retrieving various values.Notes and Caveats
While this is a decent proof of concept there are probably a few issues in need of attention:
NO_COLOR
is not currently supported even thoughyansi
supports conditional styling quite well.Reasoning
I'm creating this pull request now, in spite of it not being finished, since I'd like feedback on the above.