-
-
Notifications
You must be signed in to change notification settings - Fork 811
Adding feature to allow for skipping RS control char #633 #1155
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: 2.18
Are you sure you want to change the base?
Conversation
Looking for guidance on how the pattern for checking for the feature should be implemented in this context |
@@ -2538,8 +2540,8 @@ private final int _skipWSOrEnd() throws IOException | |||
_currInputRowStart = _inputPtr; | |||
} else if (i == INT_CR) { | |||
_skipCR(); | |||
} else if (i != INT_TAB) { | |||
_throwInvalidSpace(i); | |||
} else if (i != INT_TAB && ((_features & FEAT_MASK_ALLOW_CONTROL_CHAR) != 0 && i != INT_RS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think latter &&
needs to be ||
(so failure if Not Tab and either Don't Allow RS OR not RS).
Otherwise fails some unit tests on CI (see failures)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Aside from the one logic test I pointed out, yes, I think this looks like the way to go.
One big question is this: should RS be allowed only as white-space, or also in Content? On converting to TAB -- if only used for ignorable whitespace, no need to do anything: conceptually can be thought of working like TAB of course, but ignorable whitespace is not reported in any way. |
I pushed some minor wording changes, addition of |
Quick note: since 2.17.0 was released, can no longer be merged into 2.17 branch: API changes need to go in new minor releases. So needs rebasing to 2.18. |
Attempt at fixing #633