Sha256: afb2125e4c55f5bfb4e0a3396d72b6e397873dd7d7657f90f5d18138c197951e

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

.listingblock id=@id class=role
  - if title?
    .title=captioned_title
  .content
    - nowrap = !(@document.attr? :prewrap) || (option? 'nowrap')
    / implicit listing blocks and source blocks are rendered as code
    / explicit listing blocks stay listing
    - if @style == 'source' || (@style == 'listing' && !(attr? 1, 'listing'))
      - 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
        code class=code_class =content
    - else
      pre class=(nowrap ? 'nowrap' : nil) =content

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
asciidoctor-revealjs-1.0.4 templates/slim/block_listing.html.slim
asciidoctor-revealjs-1.0.3 templates/slim/block_listing.html.slim
asciidoctor-revealjs-1.0.2 templates/slim/block_listing.html.slim
asciidoctor-revealjs-1.0.1 templates/slim/block_listing.html.slim
asciidoctor-revealjs-1.0.0 templates/slim/block_listing.html.slim