class Gmi2html::NodeRenderers::Preformatted
Public Instance Methods
escaped_alt_text()
click to toggle source
# File lib/gmi2html/node_renderers/preformatted.rb, line 14 def escaped_alt_text CGI.escapeHTML(@node.caption) end
escaped_code()
click to toggle source
# File lib/gmi2html/node_renderers/preformatted.rb, line 18 def escaped_code return escaped_content unless @node.caption %(<code class="language-#{escaped_alt_text}">#{escaped_content}</code>) end
escaped_link()
click to toggle source
# File lib/gmi2html/node_renderers/preformatted.rb, line 10 def escaped_link CGI.escapeHTML(@node.target) end
render(_prev_node = nil, _next_node = nil)
click to toggle source
# File lib/gmi2html/node_renderers/preformatted.rb, line 24 def render(_prev_node = nil, _next_node = nil) %(<#{tag}>#{escaped_code}</#{tag}>\n) end
tag()
click to toggle source
# File lib/gmi2html/node_renderers/preformatted.rb, line 6 def tag 'pre' end