Loading lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ module JsDuck # it instead of creating a new hash. def build_aliases_hash(aliases, hash={}) aliases.each do |a| if a =~ /^(.+)\.([^.]+)$/ if a =~ /^([^.]+)\.(.+)$/ if hash[$1] hash[$1] << $2 else Loading spec/aggregator_aliases_spec.rb +14 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,20 @@ describe JsDuck::Aggregator do it_should_behave_like "multiple aliases" end describe "Alias with more than one dot (.) in it" do before do @doc = parse(<<-EOS)[0] /** * @class MyClass * @alias widget.foo.bar */ EOS end it "will use the first part as namespace" do @doc[:aliases].should == {"widget" => ["foo.bar"]} end end describe "Ext.define() with simple alias" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ module JsDuck # it instead of creating a new hash. def build_aliases_hash(aliases, hash={}) aliases.each do |a| if a =~ /^(.+)\.([^.]+)$/ if a =~ /^([^.]+)\.(.+)$/ if hash[$1] hash[$1] << $2 else Loading
spec/aggregator_aliases_spec.rb +14 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,20 @@ describe JsDuck::Aggregator do it_should_behave_like "multiple aliases" end describe "Alias with more than one dot (.) in it" do before do @doc = parse(<<-EOS)[0] /** * @class MyClass * @alias widget.foo.bar */ EOS end it "will use the first part as namespace" do @doc[:aliases].should == {"widget" => ["foo.bar"]} end end describe "Ext.define() with simple alias" do before do @doc = parse(<<-EOS)[0] Loading