Sha256: e6a8696060719ccbe40f155bb6db6828c97eb304651a685ee6434236f299d70d
Contents?: true
Size: 1.27 KB
Versions: 21
Compression:
Stored size: 1.27 KB
Contents
%div{:id=>@id, :class=>['listingblock', role, ('slide' if option? :step)]} - if title? .title=captioned_title .content - nowrap = !(@document.attr? :prewrap) || (option? 'nowrap') - if @style == 'source' - language = attr :language - code_class = language ? [language, "language-#{language}"] : nil - pre_class = ['highlight'] - pre_lang = nil - case attr 'source-highlighter' - when 'coderay' - pre_class = ['CodeRay'] - when 'pygments' - pre_class = ['pygments','highlight'] - when 'prettify' - pre_class = ['prettyprint'] - pre_class << 'linenums' if attr? :linenums - pre_class << language if language - pre_class << "language-#{language}" if language - code_class = nil - when 'html-pipeline' - pre_lang = language - pre_class = code_class = nil - nowrap = false -#- when 'highlightjs', 'highlight.js' - pre_class << 'nowrap' if nowrap %pre{:class=>pre_class, :lang=>pre_lang} -# Haml automatically preserves whitespace in <pre> tags by replacing newlines with 
, but I'm not sure about the <code> tag %code{:class=>code_class}~content - else %pre{:class=>(nowrap ? 'nowrap' : nil)}=content
Version data entries
21 entries across 21 versions & 1 rubygems