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

Line length is not respected for comments #221

Open
lyz-code opened this issue Feb 2, 2023 · 2 comments
Open

Line length is not respected for comments #221

lyz-code opened this issue Feb 2, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed upstream

Comments

@lyz-code
Copy link
Owner

lyz-code commented Feb 2, 2023

Description

Line cropping is not working for comments.

Steps to reproduce

Transform the next document:

# this_is_a_test: asdfasdfasfd asdf adsfasdfasdfasfd asdfasdfasdfasdfa adsfasdfasfdasdf asdfasdfasdfasdf asdfasdfasdfa asdfasdfasdf asdfasdfads asdfasdfasdf asdfasdfasdf asdfasfda
this_is_a_test: asdfasdfasfd asdf adsfasdfasdfasfd asdfasdfasdfasdfa adsfasdfasfdasdf asdfasdfasdfasdf asdfasdfasdfa asdfasdfasdf asdfasdfads asdfasdfasdf asdfasdfasdf asdfasfda

Current behavior

The non commented line gets cropped but the comment doesn't

---
# this_is_a_test: asdfasdfasfd asdf adsfasdfasdfasfd asdfasdfasdfasdfa adsfasdfasfdasdf asdfasdfasdfasdf asdfasdfasdfa asdfasdfasdf asdfasdfads asdfasdfasdf asdfasdfasdf asdfasfda
this_is_a_test: asdfasdfasfd asdf adsfasdfasdfasfd asdfasdfasdfasdfa adsfasdfasfdasdf
  asdfasdfasdfasdf asdfasdfasdfa asdfasdfasdf asdfasdfads asdfasdfasdf asdfasdfasdf
  asdfasfda

Desired behavior

The comment line is also cropped

@lyz-code lyz-code added the bug Something isn't working label Feb 2, 2023
@lyz-code lyz-code mentioned this issue Feb 2, 2023
2 tasks
@lyz-code lyz-code added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 2, 2023
@babyhuey
Copy link

babyhuey commented Feb 2, 2023

I'm pretty sure this is due to ruyaml (and ruamel) not fixing comments. I tried to play with them directly yesterday, and they did not fix the comments, so I think it's an upstream issue

@lyz-code
Copy link
Owner Author

lyz-code commented Feb 3, 2023

Opened the issue upstream. We can wait for them to fix it or we can patch it here in yamlfix until they do as we've done with other stuff.

Thank you @babyhuey for taking a look at it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed upstream
Projects
None yet
Development

No branches or pull requests

2 participants