Loading lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ module JsDuck # it instead of creating a new hash. def build_aliases_hash(aliases, hash={}) aliases.each do |a| if a =~ /^([\w.]+)\.(\w+)$/ 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 @@ -223,6 +223,20 @@ describe JsDuck::Aggregator do end end describe "Ext.define() with dash inside alias name" do before do @doc = parse(<<-EOS)[0] /** */ Ext.define('MyClass', { alias: 'widget.foo-bar' }); EOS end it "treats dash as a normal character" do @doc[:aliases].should == {"widget" => ["foo-bar"]} end end describe "Ext.define() with xtype property" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/merger.rb +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ module JsDuck # it instead of creating a new hash. def build_aliases_hash(aliases, hash={}) aliases.each do |a| if a =~ /^([\w.]+)\.(\w+)$/ 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 @@ -223,6 +223,20 @@ describe JsDuck::Aggregator do end end describe "Ext.define() with dash inside alias name" do before do @doc = parse(<<-EOS)[0] /** */ Ext.define('MyClass', { alias: 'widget.foo-bar' }); EOS end it "treats dash as a normal character" do @doc[:aliases].should == {"widget" => ["foo-bar"]} end end describe "Ext.define() with xtype property" do before do @doc = parse(<<-EOS)[0] Loading