Skip to content

Indent multiline call-seq comment #311

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

Merged
merged 1 commit into from
May 29, 2025
Merged

Conversation

tompng
Copy link
Member

@tompng tompng commented Feb 3, 2025

Multiline call-seq should be indented.
Unindented call-seq is ambiguous. There is a pull request ruby/rdoc#1149 that changes unindented call-seq parsing result.

/*
 * call-seq:
 * Foo(int) -> Bar
 *
 * Foo is a method. This line looks like a document but part of call-seq
 *
 * Document starts from this line
 */

Spaces before /* will be deleted before call-seq extracting phase. Indent calculation does not work well.

      /* call-seq:
       * callseq(int)
       * 
       * comment
       */
comment =
"/* call-seq:
       * callseq(int)
       * 
       * comment
       */"
-      /* call-seq:
+      /*
+       * call-seq:

@tompng tompng force-pushed the fix_callseq_indentation branch from bee66e1 to fb62cf9 Compare February 3, 2025 12:10
@mrkn mrkn force-pushed the fix_callseq_indentation branch from fb62cf9 to 08334a8 Compare May 29, 2025 07:45
@mrkn mrkn merged commit bae3d4b into ruby:master May 29, 2025
78 checks passed
@tompng tompng deleted the fix_callseq_indentation branch May 29, 2025 09:50
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