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: emit empty scalars as "" instead of "~" #37

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

not-my-profile
Copy link

Fixes #36.

not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Sep 8, 2024
Previously attempting to deserialize the value of `foo` in:

    foo:

failed when a mapping, sequence or unit was expected.

Note that this fix depends on a related bug fix in yaml-rust2:
Ethiraric/yaml-rust2#37. So that:

    foo: null

or

    foo: ~

can still result in errors when a mapping/sequence/unit is expected.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Sep 8, 2024
Previously attempting to deserialize the value of `foo` in:

    foo:

failed when a mapping, sequence or unit was expected.

Note that this fix depends on a related bug fix in yaml-rust2:
Ethiraric/yaml-rust2#37. So that:

    foo: null

or

    foo: ~

can still result in errors when a mapping/sequence/unit is expected.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Sep 8, 2024
Previously attempting to deserialize the value of `foo` in:

    foo:

failed when a mapping, sequence or unit was expected.

Note that this fix depends on a related bug fix in yaml-rust2:
Ethiraric/yaml-rust2#37. So that:

    foo: null

or

    foo: ~

can still result in errors when a mapping/sequence/unit is expected.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Sep 8, 2024
Previously attempting to deserialize the value of `foo` in:

    foo:

failed when a mapping, sequence or unit was expected.

Note that this fix depends on a related bug fix in yaml-rust2:
Ethiraric/yaml-rust2#37. So that:

    foo: null

or

    foo: ~

can still result in errors when a mapping/sequence/unit is expected.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Sep 8, 2024
Previously attempting to deserialize the value of `foo` in:

    foo:

failed when a mapping, sequence or unit was expected.

Note that this fix depends on a related bug fix in yaml-rust2:
Ethiraric/yaml-rust2#37. So that:

    foo: null

or

    foo: ~

can still result in errors when a mapping/sequence/unit is expected.
@Ethiraric Ethiraric merged commit 7641a10 into Ethiraric:master Sep 13, 2024
3 checks passed
@Ethiraric
Copy link
Owner

Thank you for your contribution! ❤️

@not-my-profile
Copy link
Author

You're welcome! Could you publish a new version so that I can contribute the related fixes to marked-yaml?

Sidenote: It might be worth adding a note about the missing serde support to the README:

This crate doesn't support serde. For limited deserialization support you can use marked-yaml which depends on this crate. The saphyr fork of this crate is planned to get full serde support.

not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Oct 3, 2024
I fixed the parsing of empty scalars in rust-yaml,
see Ethiraric/yaml-rust2#37.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Oct 3, 2024
I fixed the parsing of empty scalars in rust-yaml,
see Ethiraric/yaml-rust2#37.
not-my-profile added a commit to not-my-profile/marked-data that referenced this pull request Oct 3, 2024
I fixed the parsing of empty scalars in rust-yaml,
see Ethiraric/yaml-rust2#37.
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.

Cannot distinguish between foo: and foo: ~
2 participants