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: Parse indented newlines correctly #448

Closed
wants to merge 1 commit into from

Conversation

charithe
Copy link
Contributor

Fixes the case where an indented newline causes invalid parse results.

Consider the following input where the second line contains an indented new line.

a:·b␊
···␊
c:·d␊

Before this fix, the parser produces the following:

a: null
b
c: d

With this fix, the output is as expected.

a: b
c: d

Before submitting your PR, please confirm the following.

  • Describe the purpose for which you created this PR.
  • Create test code that corresponds to the modification

Fixes the case where an indented newline causes invalid parse results.

Consider the following input where the second line contains an indented
new line.

```yaml
a:·b␊
···␊
c:·d␊
```

Before this fix, the parser produces the following:

```yaml
a: null
b
c: d
```

With this fix, the output is as expected.

```yaml
a: b
c: d
```

Signed-off-by: Charith Ellawala <[email protected]>
@charithe
Copy link
Contributor Author

Codecov upload step failed due to rate limiting.

@goccy
Copy link
Owner

goccy commented Dec 2, 2024

This problem have already been fixed with latest release. Thank you for your contribution.

@goccy goccy closed this Dec 2, 2024
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.

2 participants