Loading lib/jsduck/doc_formatter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ module JsDuck # <a> closed, auto-detection may continue when no more <a> tags open. open_a_tags -= 1 out += s.scan(/<\/a>/) elsif s.check(/<.*?>/) elsif s.check(/</) # Ignore all other HTML tags out += s.scan_until(/>|\Z/) else Loading spec/doc_formatter_spec.rb +5 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,11 @@ describe JsDuck::DocFormatter do 'See <a href="Foo.Bar"><a>Foo.Bar</a> Ext.XTemplate</a>' end it "handles unclosed HTML tags" do @formatter.replace('Malformed <img').should == 'Malformed <img' end end describe "with type information" do Loading Loading
lib/jsduck/doc_formatter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ module JsDuck # <a> closed, auto-detection may continue when no more <a> tags open. open_a_tags -= 1 out += s.scan(/<\/a>/) elsif s.check(/<.*?>/) elsif s.check(/</) # Ignore all other HTML tags out += s.scan_until(/>|\Z/) else Loading
spec/doc_formatter_spec.rb +5 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,11 @@ describe JsDuck::DocFormatter do 'See <a href="Foo.Bar"><a>Foo.Bar</a> Ext.XTemplate</a>' end it "handles unclosed HTML tags" do @formatter.replace('Malformed <img').should == 'Malformed <img' end end describe "with type information" do Loading