Module: Prawn::Dev::YardMarkup::CodeHighlight
- Defined in:
- lib/prawn/dev/yard_markup/code_highlight.rb
Instance Method Summary collapse
- #html_syntax_highlight_ruby(source) ⇒ Object (also: #html_markup_ruby)
-
#parse_codeblocks(html) ⇒ Object
Do nothing.
Instance Method Details
#html_syntax_highlight_ruby(source) ⇒ Object Also known as: html_markup_ruby
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/prawn/dev/yard_markup/code_highlight.rb', line 10 def html_syntax_highlight_ruby(source) converter = Kramdown::Converter::Html.__send__( :new, nil, Prawn::Dev::YardMarkup::Document.new('')., ) el = Kramdown::Element.new(:codeblock, source, { lang: 'ruby' }) converter.convert(el, 0) end |
#parse_codeblocks(html) ⇒ Object
Do nothing
24 25 26 |
# File 'lib/prawn/dev/yard_markup/code_highlight.rb', line 24 def parse_codeblocks(html) html end |