Describe the bugremoveLeftSideNewLineCharacter() does not remove the left side End Of Line (newline) character, \r\n, when they appear after a space. This issue does not occur in files where the EOL character is \n.
Expected behavior
I would expect the newline characters to be removed, so that no unexpected key name error is thrown.
Describe the bug
A second alternative is that it could instead be an issue with the tokenizer.
key1:
key2: abc
There is a space character after key1:. I don't know how to get a carriage return and newline character into the yaml document, so we'll imagine they are there. From viewing this document in the debugger, it appears that this space character is getting grouped with the key2 token, its Token.Origin has the value " \r\n key2". When that trailing space character after key1: is removed all of these issues are resolved. This issue does not occur in files where the EOL character is \n.
Describe the bug
removeLeftSideNewLineCharacter()
does not remove the left side End Of Line (newline) character,\r\n
, when they appear after a space. This issue does not occur in files where the EOL character is\n
.To Reproduce
This causes an
unexpected key name
error.Expected behavior I would expect the newline characters to be removed, so that no
unexpected key name
error is thrown.Describe the bug A second alternative is that it could instead be an issue with the tokenizer.
There is a space character after
key1:
. I don't know how to get a carriage return and newline character into the yaml document, so we'll imagine they are there. From viewing this document in the debugger, it appears that this space character is getting grouped with thekey2
token, itsToken.Origin
has the value" \r\n key2"
. When that trailing space character afterkey1:
is removed all of these issues are resolved. This issue does not occur in files where the EOL character is\n
.Version Variables