Sha256: 1e3c959948f3310f19e334134329cbb18eafe74c68b8f2de1788ca7d414b7ae1

Contents?: true

Size: 1.22 KB

Versions: 5

Compression:

Stored size: 1.22 KB

Contents

div.listingblock(id=node.$id(),class=node.$role())
  if node.$title() != false
    div.title !{node.$captioned_title()}
  div.content
    - var nowrap = !(node.document.$attr("prewrap",false)) || node['$option?']('nowrap')
    if node.$style() == "source" || (node.$style() == 'listing' && node.$attr(1, 'listing'))
      - language = node.$attr('language',false)
      - var code_class = language ? [language, "language-#{language}"] : ""
      - var pre_class = ['highlight']
      - var pre_lang = ""
      case node.$attr("source-highlighter")
        when "coderay"
          - pre_class = ['CodeRay']
        when 'pygments'
          - pre_class = ['pygments','highlight']
        when 'prettify'
          - pre_class = ['prettyprint']
          - pre_class.push(node.$attr("linenums",''));
          - pre_class.push(language ? language : '');
          - pre_class.push(language ? "language-#{language}" : '');
        when 'html-pipeline'
          - pre_lang = language
          - pre_class = code_class = ''
          - nowrap = false
      - pre_class.push(nowrap ? nowrap : '')
      pre(class=pre_class,lang=pre_lang)
        code(class=[code_class]) !{node.$content()}
    else
      pre(class=nowrap ? "nowrap" : "") !{node.$content()}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
asciidoctor-revealjs-1.0.4 templates/jade/listing.jade
asciidoctor-revealjs-1.0.3 templates/jade/listing.jade
asciidoctor-revealjs-1.0.2 templates/jade/listing.jade
asciidoctor-revealjs-1.0.1 templates/jade/listing.jade
asciidoctor-revealjs-1.0.0 templates/jade/listing.jade