Open GoogleCodeExporter opened 9 years ago
Can you please add tests to show how it affects 1) and 3) ?
Original comment by py4fun@gmail.com
on 10 Apr 2015 at 9:37
Hmmn yeah I'm not sure I should have written "steps" for this. Whether it's a
tab or another unwanted control character the issue is the same. As far as I
can tell \t is only special because we print "(TAB)" next to it. So sure, I
could add a test for another such char. While I'm at it I could also argue that
other chars could benefit from a textual description rather than just their
escaped form.
Original comment by joseph.g...@gmail.com
on 10 Apr 2015 at 10:34
>I could also argue that other chars could benefit from a textual description
rather than just their escaped form.
Well, we print the char AND its textual description
As far as I can see the proposal is:
Improve human readability: in case of a leading TAB, do not print it in the
error message, its textual description is enough.
Basically, you say leading TAB should not be printed but other use cases or
characters are not affected.
It is a minor issue for me. Let us see if somebody else can say something to
come to a conclusion.
Original comment by py4fun@gmail.com
on 11 Apr 2015 at 5:12
Ha, you're right. By reading the code quickly, I'd assumed that other special
chars covered by org.yaml.snakeyaml.scanner.ScannerImpl#ESCAPE_REPLACEMENTS
would get the same treatment (i.e print the char itself THEN its
representation). After adding a quick test for \b or \f, it seems those are
caught earlier in StreamReader.
Original comment by joseph.g...@gmail.com
on 12 Apr 2015 at 3:35
Original issue reported on code.google.com by
joseph.g...@gmail.com
on 10 Apr 2015 at 7:52Attachments: