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

Share comment generation logic #1747

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Share comment generation logic #1747

merged 1 commit into from
Oct 31, 2023

Conversation

kddnewton
Copy link
Collaborator

No description provided.

<%- node.comment.each_line do |line| -%>
*<%= line.prepend(" ").rstrip %>
<%- node.each_comment_line do |line| -%>
* <%= line %>
Copy link
Member

@eregon eregon Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach will leave trailing spaces for empty lines in comments (e.g. separating paragraphs).
*<%= line %> + yield line.prepend(" ").rstrip would avoid that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I was wondering why that was there. I'll fix this.

@kddnewton kddnewton merged commit 1948932 into main Oct 31, 2023
45 checks passed
@kddnewton kddnewton deleted the comments branch October 31, 2023 12:28
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.

2 participants