Skip to content

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

Merged
ry merged 1 commit into
denoland:masterfrom
kt3k:feature/fix-yaml-parse-all
Dec 21, 2019
Merged

fix(std/encoding/yaml): fix parseAll of yaml module#3535
ry merged 1 commit into
denoland:masterfrom
kt3k:feature/fix-yaml-parse-all

Conversation

@kt3k

@kt3k kt3k commented Dec 21, 2019

Copy link
Copy Markdown
Contributor

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

@ry ry left a comment

Copy link
Copy Markdown
Member

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