Loading lib/jsduck/type_parser.rb +2 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,8 @@ module JsDuck end def skip_whitespace @input.scan(/\s*/) ws = @input.scan(/\s*/) @out << ws if ws end end Loading spec/type_parser_spec.rb +7 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,13 @@ describe JsDuck::TypeParser do p.out.should == '<a href="String">string</a>' end it "preserves whitespace in output" do relations = JsDuck::Relations.new([]) p = JsDuck::TypeParser.new(relations) p.parse("( string | number )") p.out.should == '( string | number )' end end end Loading Loading
lib/jsduck/type_parser.rb +2 −1 Original line number Diff line number Diff line Loading @@ -228,7 +228,8 @@ module JsDuck end def skip_whitespace @input.scan(/\s*/) ws = @input.scan(/\s*/) @out << ws if ws end end Loading
spec/type_parser_spec.rb +7 −0 Original line number Diff line number Diff line Loading @@ -238,6 +238,13 @@ describe JsDuck::TypeParser do p.out.should == '<a href="String">string</a>' end it "preserves whitespace in output" do relations = JsDuck::Relations.new([]) p = JsDuck::TypeParser.new(relations) p.parse("( string | number )") p.out.should == '( string | number )' end end end Loading