-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add coloured deep diffs #1279
Comments
An implementation similar to #1261 should work but I will assume a line beginning with 12 spaces then a minur or plus gets coloured. |
Interesting. You'd need to have a recursive function that finds keys with the name of |
@jfalkenstein I am stumped. Your comment in the code mentions:
I have found that if I insert any Fore colour code into the string the block styling is broken. Do you recall where you found the details about trailing spaces, or do you have any other ideas for how this could be done? |
I believe I ran into this behavior through testing and following the debugger deep, deep into PyYaml code. Why? Is this proving a problem for you? |
@jfalkenstein Yes, it's proving to be a problem. Without delving as far into the internals of PyYaml, I think it is almost impossible. Any insertion of a colour code into the string causes PyYaml to not use the block styling. |
Yeah, I remember that being an ugly dungeon of deep recursion... |
HOWEVER, I think rather than doing that, I think it might be a better idea to apply the coloring AFTER the code comes out of py-yaml. |
Subject of the issue
See #1261
![download](https://private-user-images.githubusercontent.com/2305330/358951055-6bc01776-c643-4b25-bcae-fe0fa5eed57e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwODcxODAsIm5iZiI6MTcyNjA4Njg4MCwicGF0aCI6Ii8yMzA1MzMwLzM1ODk1MTA1NS02YmMwMTc3Ni1jNjQzLTRiMjUtYmNhZS1mZTBmYTVlZWQ1N2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTFUMjAzNDQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWZhMDdjN2QzOWU2YzYwMDU5YjJlMDhiMGRhYjI3NWVhYjc4YTRmYjI4YWYzYmQ3M2FjM2I0MThiYmY4Y2IxOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.0COdhYE0Gve3zGS9vrEqHcYG3V95cUOcAsCKK5ARPpA)
The text was updated successfully, but these errors were encountered: