-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Blank lines and comments after null element get lost #125
Comments
Unfortunately no, you're not missing anything -- that definitely counts as a bug. PR would be welcome. |
Thanks for the feedback @eemeli. Any pointers about what code should I look for to submit a patch? |
Maybe around here? If it's not exactly that, any fix will most likely touch |
This turned out to be related to the same fundamental issue as #126, and solving this actually improved the solution for the other issue as well. I was completely wrong on my earlier guess for the root cause, as it was the CollectionItem CST node parser that was grabbing the comment for the preceding collection value node. Previously, the collection item parser consumed blank lines and comments until it either found the value, or detected the start of the following node. Now it'll only consume an inline comment, and let the parent handle the rest. |
Awesome. I will test it and let you know if I find any issues. Thank you! |
Fix included in patch release 1.7.1. |
👍 I can confirm that works as expected. The only difference I see now is that some initial spaces are being deleted: ## Add sidecars to the pod.
## e.g.
# - name: your-image-name
- # image: your-image
- # imagePullPolicy: Always
- # ports:
- # - name: portname
- # containerPort: 1234
+# image: your-image
+# imagePullPolicy: Always
+# ports:
+# - name: portname
+# containerPort: 1234 But that's a different/less important issue. Thanks again! |
Hi!
I found a small usability problem when a
null
component gets followed by a comment (related to a different node). The indentation of the comment get lost:The issue get fixed if the
null
key gets comment but I am working with YAML that I cannot control.Am I missing something?
Thanks in advance! I am happy to work in a PR if this is not an expected behavior.
The text was updated successfully, but these errors were encountered: