Loading lib/jsduck/doc_parser.rb +2 −2 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ module JsDuck at_ftype elsif look(/@member\b/) at_member elsif look(/@inheritdoc\b/) elsif look(/@inherit[dD]oc\b/) at_inheritdoc elsif look(/@deprecated\b/) at_deprecated Loading Loading @@ -328,7 +328,7 @@ module JsDuck # matches @inheritdoc class.name#type-member def at_inheritdoc match(/@inheritdoc/) match(/@inherit[dD]oc/) add_tag(:inheritdoc) skip_horiz_white if look(@ident_chain_pattern) Loading spec/aggregator_inheritdoc_spec.rb +23 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,29 @@ describe JsDuck::Aggregator do end end describe "@inheritDoc" do before do @docs = parse(<<-EOF) /** @class Foo */ /** * @method bar * Original comment. */ /** @class Core */ /** * @method foobar * New comment. * @inheritDoc Foo#bar */ EOF @orig = @docs["Foo"][:members][:method][0] @inheritdoc = @docs["Core"][:members][:method][0] end it_behaves_like "@inheritdoc" end describe "@inheritdoc of event" do before do @docs = parse(<<-EOF) Loading Loading
lib/jsduck/doc_parser.rb +2 −2 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ module JsDuck at_ftype elsif look(/@member\b/) at_member elsif look(/@inheritdoc\b/) elsif look(/@inherit[dD]oc\b/) at_inheritdoc elsif look(/@deprecated\b/) at_deprecated Loading Loading @@ -328,7 +328,7 @@ module JsDuck # matches @inheritdoc class.name#type-member def at_inheritdoc match(/@inheritdoc/) match(/@inherit[dD]oc/) add_tag(:inheritdoc) skip_horiz_white if look(@ident_chain_pattern) Loading
spec/aggregator_inheritdoc_spec.rb +23 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,29 @@ describe JsDuck::Aggregator do end end describe "@inheritDoc" do before do @docs = parse(<<-EOF) /** @class Foo */ /** * @method bar * Original comment. */ /** @class Core */ /** * @method foobar * New comment. * @inheritDoc Foo#bar */ EOF @orig = @docs["Foo"][:members][:method][0] @inheritdoc = @docs["Core"][:members][:method][0] end it_behaves_like "@inheritdoc" end describe "@inheritdoc of event" do before do @docs = parse(<<-EOF) Loading