lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.95k stars 398 forks source link

`@!macro` cannot attach to DSL methods in `@!parse` #1583

Open UlyssesZh opened 2 months ago

UlyssesZh commented 2 months ago

@!macro cannot attach to DSL methods in @!parse.

Steps to reproduce

Write these in lib/test.rb:

# A test class.
class Test

  # @!macro [attach] property
  #   @return [$2] the $1 property
  # @!parse property :title, String

  # @!parse property :view_count, Integer
end

Run yard doc --debug.

Actual Output

No methods are documented. image

Expected Output

It should be equivalent to this:

# A test class.
class Test

  # @!macro [attach] property
  #   @return [$2] the $1 property
  property :title, String

  property :view_count, Integer
end

image

Environment details:

I have read the Contributing Guide.