Class: Yass::LiquidTags::Highlight
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Yass::LiquidTags::Highlight
- Defined in:
- lib/yass/liquid_tags.rb
Overview
Wraps the block content in HTML for Highlight.js
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
18 19 20 21 |
# File 'lib/yass/liquid_tags.rb', line 18 def render(context) block = CGI.escapeHTML super.strip %(<pre><code class="language-#{@markup.strip}">#{block}</code></pre>) end |