-
- Downloads
Extract #format from Tag#to_html.
The HTML rendering is now done in two parts: 1. Tag#format method is called, passing the DocFormatter. This is where Markdown to HTML conversion happens. 2. Tag#to_html method is called, which must just return HTML. No more can formatter be used inside #to_html. This simplified the passing of DocFormatter instance to Tags - no more do we need to inject the formatter inside Tag classes, instead we can just pass it as a parameter. With this we remove the single remaining state object from Tag class.
Showing
- lib/jsduck/class_formatter.rb 3 additions, 13 deletionslib/jsduck/class_formatter.rb
- lib/jsduck/renderer.rb 4 additions, 4 deletionslib/jsduck/renderer.rb
- lib/jsduck/tag/deprecated_tag.rb 5 additions, 1 deletionlib/jsduck/tag/deprecated_tag.rb
- lib/jsduck/tag/tag.rb 9 additions, 10 deletionslib/jsduck/tag/tag.rb
- lib/jsduck/tag_renderer.rb 9 additions, 6 deletionslib/jsduck/tag_renderer.rb
Loading
Please register or sign in to comment