Skip to content
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

fix(std/encoding/yaml): fix parseAll of yaml module #3535

Merged
merged 1 commit into from
Dec 21, 2019

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Dec 21, 2019

This PR fixes the detection of document separator --- in readPlainScalar method. In the original code in js-yaml, it checks the state.result like if (state.result):
https://github.com/nodeca/js-yaml/blob/d6983dd4291849b2854e8d26e1beb302edfd4c76/lib/js-yaml/loader.js#L535

But in our code it checks like if (!common.isNullOrUndefined(state.result)) { and it slips the case of state.result === "", and that seems causing the issue #3534.

closes #3534

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 80da2ac into denoland:master Dec 21, 2019
@kt3k kt3k deleted the feature/fix-yaml-parse-all branch December 21, 2019 09:07
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std/encoding/yaml: parseAll doesn't parse multi-document yaml
2 participants