Class: Sourcerer::MarkDownGrade::HtmlComment
- Inherits:
-
ReverseMarkdown::Converters::Base
- Object
- ReverseMarkdown::Converters::Base
- Sourcerer::MarkDownGrade::HtmlComment
- Defined in:
- lib/sourcerer/mark_down_grade.rb
Overview
HTML Comment converter: preserve comments and ensure a trailing newline.
Instance Method Summary collapse
Instance Method Details
#convert(node, _state = {}) ⇒ Object
474 475 476 477 |
# File 'lib/sourcerer/mark_down_grade.rb', line 474 def convert node, _state={} out = node.to_html out.end_with?("\n") ? out : "#{out}\n" end |