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

Refactor comment skipping #93

Closed
wants to merge 15 commits into from

Conversation

kekavc24
Copy link
Contributor

@kekavc24 kekavc24 commented Jul 5, 2024

This PR improves #90 further by:

  1. Lazily looking ahead for comments and aligns skipAndExtractComments with existing YamlEditor behaviour. The function now reverts back to the first line break it encountered when it looked ahead for comments by default
  2. Allowing callers of skipAndExtractComments to explicitly specify whether it should greedily look ahead for comments.
  3. Preventing the trailing line break for YamlScalars with the ScalarStyles plain, any, folded or literal from being pruned (may need additional tests to disprove ScalarStyle.PLAIN or ScalarStye.ANY)

Further changes made in #94


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

This was referenced Jul 5, 2024
@kekavc24 kekavc24 closed this Jul 9, 2024
@kekavc24 kekavc24 deleted the refactor-comment-skipping branch July 9, 2024 12:21
@kekavc24 kekavc24 restored the refactor-comment-skipping branch July 9, 2024 14:51
@kekavc24 kekavc24 reopened this Jul 9, 2024
@kekavc24 kekavc24 closed this Jul 17, 2024
@kekavc24 kekavc24 deleted the refactor-comment-skipping branch July 17, 2024 07:54
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