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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charithe
Copy link

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 <charith@cerbos.dev>
@charithe
Copy link
Author

Codecov upload step failed due to rate limiting.

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.

None yet

1 participant