Class: Kramdown::Converter::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/kramdown-gist/converter.rb

Instance Method Summary collapse

Instance Method Details

#convert_gist(el, indent) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Convert a gist element into a <script> tag suitable for embedding.

Returns:

  • (String)

    an HTML fragment representing this element



28
29
30
# File 'lib/kramdown-gist/converter.rb', line 28

def convert_gist(el, indent)
  "#{' '*indent}<script src=\"https://gist.github.com/#{el.value}.js\"></script>\n"
end