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
Strings consisting '\t' or '\v' not interpreted in YAML #7681
Comments
I guess (after a brief reading) that the specification allows both variants. But the goal of JSON and YAML are to be easy to interpret by a human. A human hardly distiguish a sequence of whitespaces from a tab. I think that current behavior (escape a tab) is the best choice. |
The problem is that we use YAML as default output in console. By definition it should be easy to read as an interface, but here if a module (in my case it was |
I agree that #3012 would be pretty useful for a prose text (help messages and so on). However I disagree that tab escaping is a problem. The only known use case is a formatted text within a string, like formatted help message. A tab may be rendered differently (different terminal emulators, text editors, documentation/emails/messaging apps, where the text will be pasted and so on) and it is better to always use whitespaces for formatting. |
I am not aware of any terminal emulator that interprets '\t' any other way, than several whitespaces. In case of several whitespaces, I think it would be preferable to leave the exact number of those to the renderer. |
Several, but how many?
This output looks differently in urxvt and in Vim. It also looks differently on GitHub with and without refined-github. There is no one way to show tabs.
This output doesn't form columns in urxvt, but it is unclear, whether it'll do in other terminals. |
When using escaped tab in string, YAML stops interpreting all escaped chars.
master
Steps to reproduce
Actual behavior
Strings printed in YAML consisting '\t and \v' are not interpreted.
Expected behavior
Strings printed in YAML consisting '\t' and '\v' are interpreted.
The text was updated successfully, but these errors were encountered: