Sha256: 23204c62ec36297b290a2421b8305e280d45f6423c9a85816f277aa92a9ab832
Contents?: true
Size: 733 Bytes
Versions: 14
Compression:
Stored size: 733 Bytes
Contents
# jekyll_inline_highlight # # A Liquid tag for inline syntax highlighting in Jekyll # # https://github.com/bdesham/inline_highlight # # Copyright (c) 2014-2015, Tom Preston-Werner and Benjamin Esham # See README.md for full copyright information. module Jekyll class HighlightWithDivBlock < Tags::HighlightBlock def add_code_tag(code) # code_attributes = [ # "class=\"language-#{@lang.to_s.tr("+", "-")}\"", # "data-lang=\"#{@lang}\"", # ].join(" ") code_attributes = "class=\"highlighter-rouge\"" "<div #{code_attributes}><pre class=\"highlight\"><code>"\ "#{code.chomp}</code></pre></div>" end end end Liquid::Template.register_tag('highlight', Jekyll::HighlightWithDivBlock)
Version data entries
14 entries across 14 versions & 1 rubygems