Fix whitespace bug with dictionary support #128
Merged
Conversation
@@ -45,7 +45,7 @@ private string AccumulateWord(TextReader reader) | |||
{ | |||
var peek = (char)reader.Peek(); | |||
|
|||
if (peek == '}' || peek == '~' || peek == ')' || char.IsWhiteSpace(peek)) | |||
if (peek == '}' || peek == '~' || peek == ')' || (char.IsWhiteSpace(peek) && !buffer.ToString().Contains("["))) |
rexm
May 27, 2016
Collaborator
I don't think this is a safe assumption. We shouldn't merely check to see if the buffer contains a [
, but we should check to see if the buffer contains a [
but has no subsequent ]
to ensure we are inside the brackets.
I don't think this is a safe assumption. We shouldn't merely check to see if the buffer contains a [
, but we should check to see if the buffer contains a [
but has no subsequent ]
to ensure we are inside the brackets.
@rexm Added a check for the closing square bracket |
+1 Hi Do you know when this will be merged? Incredibly useful fix |
Pushed to nuget 1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes some whitespace issues with dictionary support. The following now work: