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

Handle inline comments #3

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

adammw
Copy link

@adammw adammw commented Aug 1, 2024

What

Allows psych-comments gem to parse inline comments and round-trip them back to exported YAML

Example:

fruits: # don't add more than 5
- apples
- bananas
- tomatoes # requires some explanation

Why

Mostly because I didn't see that this had already been attempted in #2 😓 and was looking to use this feature in a custom linter/fixer, but the reformatting of inline comments was a deal-breaker.

Tasks

  • Review problems with previous attempt to ensure same issues are not present here
  • Support inline comments on first line of flow-style mapping/sequence
{ # an inline comment here is not supported
  foo: bar # here is
 } # as is here
  • Fix duplicated inline comments on flow mapping/sequences

@adammw adammw force-pushed the adammw/inline-comments branch 2 times, most recently from a19fb56 to 2eeeb3c Compare August 1, 2024 02:09
@adammw adammw marked this pull request as draft August 1, 2024 02:18
@adammw adammw force-pushed the adammw/inline-comments branch 2 times, most recently from b6e4ec2 to ca16b99 Compare August 1, 2024 02:24
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.

1 participant