Loading lib/jsduck/type_parser.rb +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ module JsDuck # # dot-separated identifiers followed by optional "[]" def base_type type = @input.scan(/[a-zA-Z_]+(\.[a-zA-Z_]+)*/) type = @input.scan(/[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*/) if !type return false Loading spec/type_parser_spec.rb +5 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ describe JsDuck::TypeParser do "RegExp", "Ext.form.Panel", "Ext.Element", "Ext.fx2.Anim", ]) JsDuck::TypeParser.new(relations).parse(str) end Loading @@ -22,6 +23,10 @@ describe JsDuck::TypeParser do parse("Ext.form.Panel").should == true end it "matches type name containing number" do parse("Ext.fx2.Anim").should == true end it "matches array of simple types" do parse("Number[]").should == true end Loading Loading
lib/jsduck/type_parser.rb +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ module JsDuck # # dot-separated identifiers followed by optional "[]" def base_type type = @input.scan(/[a-zA-Z_]+(\.[a-zA-Z_]+)*/) type = @input.scan(/[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*/) if !type return false Loading
spec/type_parser_spec.rb +5 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ describe JsDuck::TypeParser do "RegExp", "Ext.form.Panel", "Ext.Element", "Ext.fx2.Anim", ]) JsDuck::TypeParser.new(relations).parse(str) end Loading @@ -22,6 +23,10 @@ describe JsDuck::TypeParser do parse("Ext.form.Panel").should == true end it "matches type name containing number" do parse("Ext.fx2.Anim").should == true end it "matches array of simple types" do parse("Number[]").should == true end Loading