Sha256: 986072aaf3363d1dca2839a47d79a2ecb59d2518ba3e1ae99f9e7278a5780719

Contents?: true

Size: 1005 Bytes

Versions: 5

Compression:

Stored size: 1005 Bytes

Contents

- nowrap = (option? 'nowrap') || !(document.attr? 'prewrap')
- if @style == 'source'
  - syntax_hl = document.syntax_highlighter
  - lang = attr :language
  - if syntax_hl
    - doc_attrs = document.attributes
    - css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym
    - style = doc_attrs[%(#{syntax_hl.name}-style)]
    - opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {}
    - opts[:nowrap] = nowrap
= html_tag('div', { :id => id, :class => ['listingblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes)))
  - if title?
    div.title= captioned_title
  div.content
    - if syntax_hl
      = (syntax_hl.format self, lang, opts)
    - else
      - if @style == 'source'
        pre class = ['highlight', ('nowrap' if nowrap)]
          code class = [("language-#{lang}" if lang)] data-lang = ("#{lang}" if lang)
            = content || ''
      - else
        pre class = [('nowrap' if nowrap)]
          = content || ''

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
asciidoctor-revealjs-4.1.0 templates/listing.html.slim
asciidoctor-revealjs-4.1.0.rc5 templates/listing.html.slim
asciidoctor-revealjs-4.1.0.rc4 templates/listing.html.slim
asciidoctor-revealjs-4.1.0.rc3 templates/listing.html.slim
asciidoctor-revealjs-4.1.0.rc2 templates/listing.html.slim