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

Comments split files into documents #51

Closed
PaulSonOfLars opened this issue Nov 24, 2019 · 4 comments · Fixed by #103
Closed

Comments split files into documents #51

PaulSonOfLars opened this issue Nov 24, 2019 · 4 comments · Fixed by #103

Comments

@PaulSonOfLars
Copy link

When using parse.ParseFile(), I find that my single-document yaml file will get split into multiple documents every time I hit a comment; is this intentional?

example YAML to reproduce this:

key1: data
key2: data
# Comment
key3: data

Another question I have is regarding the comment parsing; the only ast.Mode available is ParseComments (which is fine), however... calling .String() on *ast.File, or *ast.Document, does not display comments.

@kcmannem
Copy link

I just ran into this as well and took a while to debug. I thought I was going crazy.

@goccy
Copy link
Owner

goccy commented May 18, 2020

Oh... Sorry, I will fix this issue.

@goccy
Copy link
Owner

goccy commented May 29, 2020

@PaulSonOfLars @kcmannem
I fixed this issue with #103 and released as v1.4.5 .

Thanks

@kcmannem
Copy link

@goccy Appreciate this! Thank you.

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 a pull request may close this issue.

3 participants