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
fixed broken serialization of duplicated entries in sequences #205
Conversation
compact = false; | ||
} | ||
|
||
|
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.
Why extra empty line?
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.
A mistake. I will fix it. Just a moment...
For example, with the following code ``` var obj = { test: 'canary' }; var array = [ 0, 1 ]; var arrayWithRefs = [ obj, obj, array, array ]; ``` `arrayWithRefs` was serialized as ``` - &ref_0test: canary - *ref0 - &ref_1- 0 - 1 - *ref1 ``` which is incorrect.
b83e4f6
to
b157c24
Compare
Rebased in order to remove the duplicated empty line I introduced. |
please remove "make browserify" from PR. |
b157c24
to
f25843d
Compare
Ok, I removed the "make browserify" commit. Would be perfect if you could browserify the library then, so that I have a commit to which I can point bower. |
Browserification is done for every tagged release. I'll release as soon as @dervus confirm that PR is ok. |
fixed broken serialization of duplicated entries in sequences
@vogelsgesang Thanks for contribution! |
Thanks for your quick response and for maintaining this library :) |
This pull request fixes a bug in the serialization of duplicated values within arrays. For example, with the following code
arrayWithRefs
was serialized aswhich is incorrect. Line breaks were missing between the reference names (
ref_0
,ref_1
) and the consecutive characters.In addition, this PR contains a regression test.