asciidoctor-html5s 0.3.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,18 @@
1
1
  - if local_attr :menuitem
2
2
  - capture
3
3
  |  
4
- b.caret ›
5
- span.menuseq
6
- b.menu
7
- =(attr :menu)
8
- - yield_capture
4
+ span.caret ›
5
+ |  
6
+ kbd.menuseq
7
+ kbd.menu
8
+ samp =(attr :menu)
9
+ - yield_capture
9
10
  - (attr 'submenus').each do |submenu|
10
- b.submenu
11
- =submenu
12
- - yield_capture
13
- b.menuitem =(local_attr :menuitem)
11
+ kbd.menu
12
+ samp =submenu
13
+ - yield_capture
14
+ kbd.menu
15
+ samp =(local_attr :menuitem)
14
16
  - else
15
- b.menuref =(attr :menu)
17
+ kbd.menu
18
+ samp =(attr :menu)
@@ -1,29 +1,32 @@
1
- - unless id.nil?
2
- a id=id aria-hidden='true'
3
1
  - case type
4
2
  - when :emphasis
5
- em class=role =text
3
+ em id=id class=role =text
6
4
  - when :strong
7
- strong class=role =text
5
+ strong id=id class=role =text
8
6
  - when :monospaced
9
- code class=role =text
7
+ code id=id class=role =text
10
8
  - when :superscript
11
- sup class=role =text
9
+ sup id=id class=role =text
12
10
  - when :subscript
13
- sub class=role =text
11
+ sub id=id class=role =text
14
12
  - when :mark
15
- mark class=role =text
13
+ mark id=id class=role =text
16
14
  - when :double
17
- = html_tag_if role?, :span, :class=>role
15
+ = html_tag_if role? || id, :span, :id=>id, :class=>role
18
16
  =(double_quoted text)
19
17
  - when :single
20
- = html_tag_if role?, :span, :class=>role
18
+ = html_tag_if role? || id, :span, :id=>id, :class=>role
21
19
  =(single_quoted text)
22
20
  - when :asciimath, :latexmath
23
- span.math data-lang=stem_lang =(delimit_stem text, type)
21
+ span.math id=id data-lang=stem_lang =(delimit_stem text, type)
24
22
  - else
25
- - if role == 'line-through' || role == 'del'
26
- del =text
23
+ - case role
24
+ - when 'line-through', 'strike'
25
+ s id=id =text
26
+ - when 'del'
27
+ del id=id =text
28
+ - when 'ins'
29
+ ins id=id =text
27
30
  - else
28
- = html_tag_if role?, :span, :class=>role
31
+ = html_tag_if role? || id, :span, :id=>id, :class=>role
29
32
  =text
@@ -1,12 +1,16 @@
1
1
  = block_with_caption :top, :class=>'listing-block'
2
2
  - if style == 'source'
3
- - if highlighter == 'html-pipeline'
3
+ - highlighter = document.attr('source-highlighter')
4
+ / Asciidoctor >=2.0.0
5
+ - if defined?(::Asciidoctor::SyntaxHighlighter) && document.syntax_highlighter
6
+ = formatted_source
7
+ / Asciidoctor <2.0.0
8
+ - elsif highlighter == 'html-pipeline'
4
9
  pre: code data-lang=source_lang =content
5
10
  - else
6
- - unless highlighter == 'CodeRay'
7
- - code_class = "language-#{source_lang}" if source_lang
11
+ / The 1st and 3rd class element is for Asciidoctor <2.0.0
8
12
  pre class=[highlighter, 'highlight', ('linenums' if attr? :linenums), nowrap?]
9
- code class=code_class data-lang=source_lang =content
13
+ code class=source_code_class data-lang=source_lang =content
10
14
  - else
11
15
  pre class=nowrap? =content
12
16
  / Note: This is a hack to embed callout list into the listing element.
@@ -1,4 +1,4 @@
1
1
  = block_with_title :class=>['olist', style]
2
2
  ol class=style start=(attr :start) type=list_marker_keyword reversed=(option? 'reversed')
3
3
  - items.each do |item|
4
- li =(print_item_content item)
4
+ li id=item.id class=item.role =(print_item_content item)
@@ -5,6 +5,6 @@
5
5
  ol.toc-list class="level-#{slevel}"
6
6
  - sections.each do |sec|
7
7
  li
8
- a href="##{sec.id}" =section_title sec
8
+ a href="##{sec.id}" =(section_title sec, drop_anchors: true)
9
9
  - if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline')
10
10
  = child_toc
@@ -1,7 +1,7 @@
1
1
  = block_with_caption :top, :class=>'table-block'
2
2
  table [
3
- class=["frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", spread?]
4
- style=style_value(width: ("#{attr :tablepcwidth}%" if !autowidth? && !spread? || (local_attr :width)),
3
+ class=["frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", stretch?, ("stripes-#{attr :stripes}" if attr? :stripes)]
4
+ style=style_value(width: ("#{attr :tablepcwidth}%" if !autowidth? && !stretch? || (local_attr :width)),
5
5
  float: (attr :float)) ]
6
6
  - unless (attr :rowcount).zero?
7
7
  colgroup
@@ -10,7 +10,7 @@
10
10
  col
11
11
  - else
12
12
  - columns.each do |col|
13
- col style="width: #{col.attr :colpcwidth}%;"
13
+ col style=style_value(width: ("#{col.attr :colpcwidth}%" if !autowidth? col))
14
14
  - [:head, :foot, :body].reject { |tblsec| rows[tblsec].empty? }.each do |tblsec|
15
15
  <t#{tblsec}>
16
16
  - rows[tblsec].each do |row|
@@ -27,13 +27,12 @@
27
27
  - case cell.style
28
28
  - when :asciidoc
29
29
  =cell.content
30
- - when :verse
31
- .verse: pre =cell.text
32
30
  - when :literal
33
31
  .literal: pre =cell.text
34
32
  - else
35
- - if cell.content.one?
36
- =cell.content.first
33
+ - if (content = cell.content).one?
34
+ =content.first
37
35
  - else
38
- - cell.content.each do |text|
36
+ - content.each do |text|
39
37
  p =text
38
+ </t#{tblsec}>
@@ -3,9 +3,9 @@
3
3
  ul class=(checklist || style)
4
4
  - items.each do |item|
5
5
  - if checklist && (item.attr? :checkbox)
6
- li.task-list-item
6
+ li.task-list-item id=item.id class=item.role
7
7
  input.task-list-item-checkbox type='checkbox' disabled=true checked=(item.attr? :checked)
8
8
  =<item.text
9
9
  - else
10
- li
10
+ li id=item.id class=item.role
11
11
  =(print_item_content item)
@@ -13,6 +13,7 @@
13
13
  height=(attr :height)
14
14
  poster=(media_uri(attr :poster) if attr? :poster)
15
15
  autoplay=(option? 'autoplay')
16
+ muted=(option? 'muted')
16
17
  controls=!(option? 'nocontrols')
17
18
  loop=(option? 'loop') ]
18
19
  | Your browser does not support the video tag.
@@ -3,6 +3,10 @@ require 'asciidoctor/html5s/converter'
3
3
  require 'asciidoctor/html5s/replacements'
4
4
  require 'asciidoctor/html5s/attached_colist_treeprocessor'
5
5
 
6
+ if defined? Asciidoctor::SyntaxHighlighter
7
+ require 'asciidoctor/html5s/html_pipeline_highlighter'
8
+ end
9
+
6
10
  unless RUBY_PLATFORM == 'opal'
7
11
  require 'asciidoctor/extensions'
8
12
 
@@ -9,6 +9,8 @@ module Asciidoctor::Html5s
9
9
  class AttachedColistTreeprocessor < ::Asciidoctor::Extensions::Treeprocessor
10
10
 
11
11
  def process(document)
12
+ return if document.backend != 'html5s'
13
+
12
14
  document.find_by(context: :colist) do |colist|
13
15
  blocks = colist.parent.blocks
14
16
  colist_idx = blocks.find_index(colist)
@@ -6,7 +6,6 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
6
6
  #------------------------------ Begin of Helpers ------------------------------#
7
7
 
8
8
  require 'asciidoctor/html5s'
9
- require 'asciidoctor/html5s/logger'
10
9
  require 'date' unless RUBY_PLATFORM == 'opal'
11
10
 
12
11
  # Add custom functions to this module that you want to use in your Slim
@@ -15,10 +14,11 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
15
14
  module Helpers
16
15
 
17
16
  # URIs of external assets.
18
- FONT_AWESOME_URI = '//cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css'
19
- HIGHLIGHTJS_BASE_URI = '//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/'
20
- KATEX_CSS_URI = '//cdn.jsdelivr.net/npm/katex@0.9.0/dist/katex.min.css'
21
- KATEX_JS_URI = '//cdn.jsdelivr.net/npm/katex@0.9.0/dist/katex.min.js'
17
+ CDN_BASE_URI = 'https://cdnjs.cloudflare.com/ajax/libs' # for highlighters in Asciidoctor >=2.0.0
18
+ FONT_AWESOME_URI = 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css'
19
+ HIGHLIGHTJS_BASE_URI = 'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.1/build/'
20
+ KATEX_CSS_URI = 'https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css'
21
+ KATEX_JS_URI = 'https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js'
22
22
 
23
23
  # Defaults
24
24
  DEFAULT_HIGHLIGHTJS_THEME = 'github'
@@ -60,7 +60,7 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
60
60
 
61
61
  # @return [Logger]
62
62
  def log
63
- @_html5s_logger ||= ::Asciidoctor::Html5s::Logging.default_logger
63
+ ::Asciidoctor::LoggerManager.logger
64
64
  end
65
65
 
66
66
  ##
@@ -383,15 +383,29 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
383
383
  # Returns the captioned section's title, optionally numbered.
384
384
  #
385
385
  # @param sec [Asciidoctor::Section] the section node (default: self).
386
+ # @param drop_anchors [Boolean] Remove +<a>+ tags from the title?
386
387
  # @return [String]
387
388
  #
388
- def section_title(sec = self)
389
- sectnumlevels = document.attr(:sectnumlevels, DEFAULT_SECTNUMLEVELS).to_i
389
+ def section_title(sec = self, drop_anchors: false)
390
+ title =
391
+ if sec.caption
392
+ sec.captioned_title
393
+ elsif sec.numbered && sec.level <= document.attr(:sectnumlevels, DEFAULT_SECTNUMLEVELS).to_i
394
+ if sec.level < 2 && document.doctype == 'book' && %w[chapter part].include?(sec.sectname)
395
+ signifier = document.attr("#{sec.sectname}-signifier")
396
+ sectnum = sec.sectname == 'part' ? sec.sectnum(nil, ':') : sec.sectnum
397
+ "#{signifier&.+ ' '}#{sectnum} #{sec.title}"
398
+ else
399
+ "#{sec.sectnum} #{sec.title}"
400
+ end
401
+ else
402
+ sec.title
403
+ end
390
404
 
391
- if sec.numbered && !sec.caption && sec.level <= sectnumlevels
392
- [sec.sectnum, sec.captioned_title].join(' ')
405
+ if drop_anchors && title.include?('<a')
406
+ title.gsub(/<(?:a[^>+]+|\/a)>/, '')
393
407
  else
394
- sec.captioned_title
408
+ title
395
409
  end
396
410
  end
397
411
 
@@ -403,7 +417,12 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
403
417
  end
404
418
 
405
419
  def link_rel
406
- 'noopener' if option?('noopener') || attr(:window) == '_blank'
420
+ rel = [
421
+ ('nofollow' if option?('nofollow')),
422
+ ('noopener' if option?('noopener') || local_attr(:window) == '_blank')
423
+ ].compact
424
+
425
+ rel.empty? ? nil : rel.join(' ')
407
426
  end
408
427
 
409
428
  #--------------------------------------------------------
@@ -462,15 +481,19 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
462
481
  #
463
482
 
464
483
  ##
465
- # @return [String] a canonical name of the source-highlighter to be used as
466
- # a style class.
467
- def highlighter
468
- @_html5s_highlighter ||=
469
- case (highlighter = document.attr('source-highlighter'))
470
- when 'coderay'; 'CodeRay'
471
- when 'highlight.js'; 'highlightjs'
472
- else highlighter
473
- end
484
+ # See {Asciidoctor::SyntaxHighlighter#format}.
485
+ #
486
+ # @return [String, nil] a rendered HTML.
487
+ def formatted_source
488
+ hl = document.syntax_highlighter or return nil
489
+
490
+ opts = { nowrap: nowrap? }
491
+ if hl.highlight?
492
+ opts[:css_mode] = document.attr("#{hl.name}-css", :class).to_sym
493
+ opts[:style] = document.attr("#{hl.name}-style")
494
+ end
495
+
496
+ hl.format(self, source_lang, opts)
474
497
  end
475
498
 
476
499
  ##
@@ -488,6 +511,15 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
488
511
  local_attr :language, false
489
512
  end
490
513
 
514
+ # This is needed only for Asciidoctor <2.0.0.
515
+ def source_code_class
516
+ if document.attr? 'source-highlighter', 'highlightjs'
517
+ "language-#{source_lang || 'none'} hljs"
518
+ elsif source_lang
519
+ "language-#{source_lang}"
520
+ end
521
+ end
522
+
491
523
  #--------------------------------------------------------
492
524
  # block_open
493
525
  #
@@ -509,7 +541,7 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
509
541
  def partintro_allowed?
510
542
  if result = (level != 0 || parent.context != :section || document.doctype != 'book')
511
543
  log.warn "asciidoctor: ERROR: partintro block can only be used when doctype
512
- is book and it's a child of a book part. Excluding block content."
544
+ is book and must be a child of a book part. Excluding block content."
513
545
  end
514
546
  !result
515
547
  end
@@ -518,13 +550,13 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
518
550
  # block_table
519
551
  #
520
552
 
521
- def autowidth?
522
- option? :autowidth
553
+ def autowidth?(node = self)
554
+ node.option? :autowidth
523
555
  end
524
556
 
525
- def spread?
557
+ def stretch?
526
558
  if !autowidth? || local_attr?('width')
527
- 'spread' if attr? :tablepcwidth, 100
559
+ 'stretch' if attr? :tablepcwidth, 100
528
560
  end
529
561
  end
530
562
 
@@ -542,7 +574,8 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
542
574
  when :vimeo
543
575
  params = {
544
576
  autoplay: (1 if option? 'autoplay'),
545
- loop: (1 if option? 'loop')
577
+ loop: (1 if option? 'loop'),
578
+ muted: (1 if option? 'muted')
546
579
  }
547
580
  start_anchor = "#at=#{attr :start}" if attr? :start
548
581
  "//player.vimeo.com/video/#{attr :target}#{start_anchor}#{url_query params}"
@@ -556,6 +589,7 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
556
589
  list: (attr :list, list_id),
557
590
  autoplay: (1 if option? 'autoplay'),
558
591
  loop: (1 if option? 'loop'),
592
+ muted: (1 if option? 'muted'),
559
593
  controls: (0 if option? 'nocontrols')
560
594
  }
561
595
  "//www.youtube.com/embed/#{video_id}#{url_query params}"
@@ -610,10 +644,9 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
610
644
  stylesheet = attr :stylesheet
611
645
  stylesdir = attr :stylesdir, ''
612
646
  default_style = ::Asciidoctor::DEFAULT_STYLESHEET_KEYS.include? stylesheet
613
- linkcss = attr?(:linkcss) || safe >= ::Asciidoctor::SafeMode::SECURE
614
647
  ss = ::Asciidoctor::Stylesheets.instance
615
648
 
616
- if linkcss
649
+ if attr?(:linkcss)
617
650
  path = default_style ? ::Asciidoctor::DEFAULT_STYLESHEET_NAME : stylesheet
618
651
  styles << { href: [stylesdir, path] }
619
652
  elsif default_style
@@ -636,23 +669,15 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
636
669
  scripts << { text: KATEX_RENDER_CODE }
637
670
  end
638
671
 
639
- case attr 'source-highlighter'
640
- when 'coderay'
641
- if attr('coderay-css', 'class') == 'class'
642
- if linkcss
643
- styles << { href: [stylesdir, ss.coderay_stylesheet_name] }
644
- else
645
- styles << { text: ss.coderay_stylesheet_data }
646
- end
647
- end
648
-
649
- when 'highlightjs'
650
- hjs_base = attr :highlightjsdir, HIGHLIGHTJS_BASE_URI
651
- hjs_theme = attr 'highlightjs-theme', DEFAULT_HIGHLIGHTJS_THEME
672
+ if !defined?(::Asciidoctor::SyntaxHighlighter) # Asciidoctor <2.0.0
673
+ if attr? 'source-highlighter', 'highlightjs'
674
+ hjs_base = attr :highlightjsdir, HIGHLIGHTJS_BASE_URI
675
+ hjs_theme = attr 'highlightjs-theme', DEFAULT_HIGHLIGHTJS_THEME
652
676
 
653
- scripts << { src: [hjs_base, 'highlight.min.js'] }
654
- scripts << { text: 'hljs.initHighlightingOnLoad()' }
655
- styles << { href: [hjs_base, "styles/#{hjs_theme}.min.css"] }
677
+ scripts << { src: [hjs_base, 'highlight.min.js'] }
678
+ scripts << { text: 'hljs.initHighlightingOnLoad()' }
679
+ styles << { href: [hjs_base, "styles/#{hjs_theme}.min.css"] }
680
+ end
656
681
  end
657
682
 
658
683
  styles.each do |item|
@@ -671,6 +696,15 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
671
696
  end
672
697
  end
673
698
 
699
+ if defined?(::Asciidoctor::SyntaxHighlighter) && (hl = syntax_highlighter) # Asciidoctor >=2.0.0
700
+ # XXX: We don't care about the declared location and put all to head.
701
+ [:head, :footer].each do |location|
702
+ if hl.docinfo?(location)
703
+ tags << hl.docinfo(location, self, cdn_base_url: CDN_BASE_URI, linkcss: attr?(:linkcss))
704
+ end
705
+ end
706
+ end
707
+
674
708
  tags.join("\n")
675
709
  end
676
710
 
@@ -685,27 +719,21 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
685
719
  text
686
720
  elsif (path = local_attr :path)
687
721
  path
688
- elsif document.respond_to? :catalog # Asciidoctor >=1.5.6
722
+ else
689
723
  ref = document.catalog[:refs][attr :refid]
690
724
  if ref.kind_of? Asciidoctor::AbstractNode
691
- ref.xreftext((@_html5s_xrefstyle ||= document.attributes['xrefstyle']))
725
+ ref.xreftext(attr(:xrefstyle, nil, true))
692
726
  end
693
- else # Asciidoctor < 1.5.6
694
- document.references[:ids][attr :refid || target]
695
727
  end
696
728
  (str || "[#{attr :refid}]").tr_s("\n", ' ')
697
729
  end
698
730
 
699
731
  # @return [String, nil] text of the bibref anchor, or +nil+ if not found.
700
732
  def bibref_text
701
- if document.respond_to? :catalog # Asciidoctor >=1.5.6
702
- if ::Asciidoctor::VERSION[0] == '1'
703
- text
704
- else # Asciidoctor >= 2.0.0
705
- "[#{reftext || id}]"
706
- end
707
- else
708
- "[#{target}]"
733
+ if ::Asciidoctor::VERSION[0] == '1'
734
+ text
735
+ else # Asciidoctor >= 2.0.0
736
+ "[#{reftext || id}]"
709
737
  end
710
738
  end
711
739
 
@@ -779,91 +807,158 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
779
807
  #----------------- Begin of generated transformation methods -----------------#
780
808
 
781
809
 
782
- def image(node, opts = {})
783
- node.extend(Helpers)
784
- node.instance_eval do
785
- _buf = []; _slim_controls1 = block_with_caption(:bottom, :class=>'image-block', :style=>style_value(text_align: (attr :align), float: (attr :float))) do; _slim_controls2 = [];
786
- ; target_url = image_uri(attr :target);
787
- ; _slim_controls3 = html_tag_if(image_link, :a,
788
- :class=>['image', ('bare' if image_link == target_url)],
789
- :href=>image_link,
790
- :title=>image_link_label,
791
- 'aria-label'=>image_link_label,
792
- :target=>(attr :window),
793
- :rel=>link_rel) do; _slim_controls4 = [];
794
- ; _slim_controls4 << ("<img"); _slim_codeattributes1 = target_url; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls4 << (" src"); else; _slim_controls4 << (" src=\""); _slim_controls4 << (_slim_codeattributes1); _slim_controls4 << ("\""); end; end; _slim_codeattributes2 = (attr :alt); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls4 << (" alt"); else; _slim_controls4 << (" alt=\""); _slim_controls4 << (_slim_codeattributes2); _slim_controls4 << ("\""); end; end; _slim_codeattributes3 = (attr :width); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls4 << (" width"); else; _slim_controls4 << (" width=\""); _slim_controls4 << (_slim_codeattributes3); _slim_controls4 << ("\""); end; end; _slim_codeattributes4 = (attr :height); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls4 << (" height"); else; _slim_controls4 << (" height=\""); _slim_controls4 << (_slim_codeattributes4); _slim_controls4 << ("\""); end; end; _slim_codeattributes5 = (attr :loading); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls4 << (" loading"); else; _slim_controls4 << (" loading=\""); _slim_controls4 << (_slim_codeattributes5); _slim_controls4 << ("\""); end; end; _slim_controls4 << (">");
795
- ; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
796
- end
797
- end
798
-
799
- def open(node, opts = {})
810
+ def olist(node, opts = {})
800
811
  node.extend(Helpers)
801
812
  node.instance_eval do
802
- _buf = []; if style == 'abstract';
803
- ; if abstract_allowed?;
804
- ; _slim_controls1 = block_with_title :class=>'quote-block abstract' do; _slim_controls2 = [];
805
- ; _slim_controls2 << ("<blockquote>"); _slim_controls2 << (content);
806
- ; _slim_controls2 << ("</blockquote>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); end; elsif style != 'partintro' || partintro_allowed?;
807
- ; _slim_controls3 = block_with_title :class=>['open-block', (style if style != 'open')] do; _slim_controls4 = [];
808
- ; _slim_controls4 << ("<div class=\"content\">"); _slim_controls4 << (content);
809
- ; _slim_controls4 << ("</div>"); _slim_controls4 = _slim_controls4.join(""); end; _buf << (_slim_controls3); end; _buf = _buf.join("")
813
+ _buf = []; _slim_controls1 = block_with_title :class=>['olist', style] do; _slim_controls2 = [];
814
+ ; _slim_controls2 << ("<ol"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = style; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = (attr :start); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" start"); else; _slim_controls2 << (" start=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_codeattributes3 = list_marker_keyword; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" type"); else; _slim_controls2 << (" type=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_codeattributes4 = (option? 'reversed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" reversed"); else; _slim_controls2 << (" reversed=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
815
+ ; items.each do |item|;
816
+ ; _slim_controls2 << ("<li"); _slim_codeattributes5 = item.id; if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" id"); else; _slim_controls2 << (" id=\""); _slim_controls2 << (_slim_codeattributes5); _slim_controls2 << ("\""); end; end; _temple_html_attributeremover2 = []; _slim_codeattributes6 = item.role; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes6.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes6); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_controls2 << (">"); _slim_controls2 << ((print_item_content item));
817
+ ; _slim_controls2 << ("</li>"); end; _slim_controls2 << ("</ol>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
810
818
  end
811
819
  end
812
820
 
813
- def inline_callout(node, opts = {})
821
+ def verse(node, opts = {})
814
822
  node.extend(Helpers)
815
823
  node.instance_eval do
816
- _buf = []; _buf << ("<b class=\"conum\">"); _buf << (text);
817
- ; _buf << ("</b>"); _buf = _buf.join("")
824
+ _buf = []; _slim_controls1 = block_with_title :class=>'verse-block' do; _slim_controls2 = [];
825
+ ; if attr?(:attribution) || attr?(:citetitle);
826
+ ; _slim_controls2 << ("<blockquote class=\"verse\"><pre class=\"verse\">");
827
+ ; _slim_controls2 << (content);
828
+ ; _slim_controls2 << ("</pre><footer>&#8212; <cite>");
829
+ ;
830
+ ;
831
+ ; _slim_controls2 << ([(attr :attribution), (attr :citetitle)].compact.join(', '));
832
+ ; _slim_controls2 << ("</cite></footer></blockquote>");
833
+ ; else;
834
+ ; _slim_controls2 << ("<pre class=\"verse\">"); _slim_controls2 << (content);
835
+ ; _slim_controls2 << ("</pre>"); end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
818
836
  end
819
837
  end
820
838
 
821
- def page_break(node, opts = {})
839
+ def inline_footnote(node, opts = {})
822
840
  node.extend(Helpers)
823
841
  node.instance_eval do
824
- _buf = []; _buf << ("<div role=\"doc-pagebreak\" style=\"page-break-after: always;\"></div>");
825
- ; _buf = _buf.join("")
842
+ _buf = []; if (index = local_attr :index);
843
+ ;
844
+ ;
845
+ ;
846
+ ;
847
+ ; _buf << ("<a class=\"footnote-ref\""); _slim_codeattributes1 = (footnoteref_id unless type == :xref); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (" href=\"#"); _buf << (footnote_id); _buf << ("\" title=\"View footnote "); _buf << (index); _buf << ("\" role=\"doc-noteref\">[");
848
+ ; _buf << (index); _buf << ("]</a>");
849
+ ; else;
850
+ ; _buf << ("<a class=\"footnote-ref broken\" title=\"Unresolved footnote reference.\">["); _buf << (text); _buf << ("]</a>");
851
+ ; end; _buf = _buf.join("")
826
852
  end
827
853
  end
828
854
 
829
- def admonition(node, opts = {})
855
+ def preamble(node, opts = {})
830
856
  node.extend(Helpers)
831
857
  node.instance_eval do
832
- _buf = []; capture do;
833
- ; _buf << ("<h6"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "block-title"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = ('label-only' unless title?); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << ("><span class=\"title-label\">");
834
- ; _buf << ("#{local_attr :textlabel}: ");
835
- ; _buf << ("</span>"); _buf << (title);
836
- ; _buf << ("</h6>"); _slim_controls1 = html_tag_if !blocks?, :p do; _slim_controls2 = [];
837
- ; _slim_controls2 << (content);
838
- ; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); end; if admonition_aside?;
839
- ; _buf << ("<aside"); _temple_html_attributeremover2 = []; _temple_html_attributemerger2 = []; _temple_html_attributemerger2[0] = "admonition-block"; _temple_html_attributemerger2[1] = []; _slim_codeattributes2 = [(attr :name), role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributemerger2[1] << (_slim_codeattributes2.join(" ")); else; _temple_html_attributemerger2[1] << (_slim_codeattributes2); end; _temple_html_attributemerger2[1] = _temple_html_attributemerger2[1].join(""); _temple_html_attributeremover2 << (_temple_html_attributemerger2.reject(&:empty?).join(" ")); _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _slim_codeattributes4 = admonition_aria; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" role"); else; _buf << (" role=\""); _buf << (_slim_codeattributes4); _buf << ("\""); end; end; _buf << (">");
840
- ; yield_capture;
841
- ; _buf << ("</aside>"); else;
842
- ; _buf << ("<section"); _temple_html_attributeremover3 = []; _temple_html_attributemerger3 = []; _temple_html_attributemerger3[0] = "admonition-block"; _temple_html_attributemerger3[1] = []; _slim_codeattributes5 = [(attr :name), role]; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributemerger3[1] << (_slim_codeattributes5.join(" ")); else; _temple_html_attributemerger3[1] << (_slim_codeattributes5); end; _temple_html_attributemerger3[1] = _temple_html_attributemerger3[1].join(""); _temple_html_attributeremover3 << (_temple_html_attributemerger3.reject(&:empty?).join(" ")); _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover3); _buf << ("\""); end; _slim_codeattributes6 = id; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes6); _buf << ("\""); end; end; _slim_codeattributes7 = admonition_aria; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" role"); else; _buf << (" role=\""); _buf << (_slim_codeattributes7); _buf << ("\""); end; end; _buf << (">");
843
- ; yield_capture;
844
- ; _buf << ("</section>"); end; _buf = _buf.join("")
858
+ _buf = []; _buf << ("<section id=\"preamble\" aria-label=\"Preamble\">");
859
+ ; _buf << (content);
860
+ ; _buf << ("</section>"); if (document.attr? :toc) && (document.attr? 'toc-placement', 'preamble');
861
+ ; _buf << ("<nav id=\"toc\""); _temple_html_attributeremover1 = []; _slim_codeattributes1 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (" role=\"doc-toc\"><h2 id=\"toc-title\">");
862
+ ; _buf << ((document.attr 'toc-title'));
863
+ ; _buf << ("</h2>");
864
+ ; _buf << (converter.convert document, 'outline');
865
+ ; _buf << ("</nav>");
866
+ ; end; _buf = _buf.join("")
845
867
  end
846
868
  end
847
869
 
848
- def listing(node, opts = {})
870
+ def document(node, opts = {})
849
871
  node.extend(Helpers)
850
872
  node.instance_eval do
851
- _buf = []; _slim_controls1 = block_with_caption :top, :class=>'listing-block' do; _slim_controls2 = [];
852
- ; if style == 'source';
853
- ; if highlighter == 'html-pipeline';
854
- ; _slim_controls2 << ("<pre><code"); _slim_codeattributes1 = source_lang; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << (content);
855
- ; _slim_controls2 << ("</code></pre>"); else;
856
- ; unless highlighter == 'CodeRay';
857
- ; code_class = "language-#{source_lang}" if source_lang;
858
- ; end; _slim_controls2 << ("<pre"); _temple_html_attributeremover1 = []; _slim_codeattributes2 = [highlighter, 'highlight', ('linenums' if attr? :linenums), nowrap?]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << ("><code");
859
- ; _temple_html_attributeremover2 = []; _slim_codeattributes3 = code_class; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes3.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes3); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_codeattributes4 = source_lang; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << (content);
860
- ; _slim_controls2 << ("</code></pre>"); end; else;
861
- ; _slim_controls2 << ("<pre"); _temple_html_attributeremover3 = []; _slim_codeattributes5 = nowrap?; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes5.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes5); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover3); _slim_controls2 << ("\""); end; _slim_controls2 << (">"); _slim_controls2 << (content);
862
- ; _slim_controls2 << ("</pre>");
873
+ _buf = []; _buf << ("<!DOCTYPE html><html");
874
+ ; _slim_codeattributes1 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" lang"); else; _buf << (" lang=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (">");
863
875
  ;
864
- ; end; if callout_list;
865
- ; _slim_controls2 << (converter.convert callout_list, 'colist');
866
- ; end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
876
+ ;
877
+ ;
878
+ ;
879
+ ; document_content = content;
880
+ ; _buf << ("<head><meta");
881
+ ; _slim_codeattributes2 = (attr :encoding, 'UTF-8'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" charset"); else; _buf << (" charset=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << ("><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><meta name=\"generator\" content=\"Asciidoctor ");
882
+ ;
883
+ ;
884
+ ; _buf << (attr 'asciidoctor-version'); _buf << ("\">");
885
+ ; _buf << (html_meta_if 'application-name', (attr 'app-name'));
886
+ ; _buf << (html_meta_if 'author', (attr :authors));
887
+ ; _buf << (html_meta_if 'copyright', (attr :copyright));
888
+ ; _buf << (html_meta_if 'description', (attr :description));
889
+ ; _buf << (html_meta_if 'keywords', (attr :keywords));
890
+ ; _buf << ("<title>"); _buf << (((doctitle sanitize: true) || (attr 'untitled-label')));
891
+ ; _buf << ("</title>"); _buf << (styles_and_scripts);
892
+ ; unless (docinfo_content = docinfo).empty?;
893
+ ; _buf << (docinfo_content);
894
+ ; end; _buf << ("</head><body");
895
+ ;
896
+ ;
897
+ ; _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes4 = [(attr :doctype),
898
+ ("#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}" if (attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto')),
899
+ (attr :docrole) || (attr :role)]; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes4.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes4); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes5 = style_value(max_width: (attr 'max-width')); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" style"); else; _buf << (" style=\""); _buf << (_slim_codeattributes5); _buf << ("\""); end; end; _buf << (">");
900
+ ; unless (docinfo_content = (docinfo :header)).empty?;
901
+ ; _buf << (docinfo_content);
902
+ ; end; unless noheader;
903
+ ; _buf << ("<header>");
904
+ ; if header?;
905
+ ; unless notitle;
906
+ ; _buf << ("<h1>"); _buf << (header.title);
907
+ ; _buf << ("</h1>"); end; if [:author, :revnumber, :revdate, :revremark].any? {|a| attr? a };
908
+ ; _buf << ("<div class=\"details\">");
909
+ ; if attr? :author;
910
+ ; _buf << ("<span class=\"author\" id=\"author\">"); _buf << ((attr :author));
911
+ ; _buf << ("</span><br>");
912
+ ; if attr? :email;
913
+ ; _buf << ("<span class=\"email\" id=\"email\">"); _buf << (sub_macros(attr :email));
914
+ ; _buf << ("</span><br>");
915
+ ; end; if (authorcount = (attr :authorcount).to_i) > 1;
916
+ ; (2..authorcount).each do |idx|;
917
+ ; _buf << ("<span class=\"author\" id=\"author"); _buf << (idx); _buf << ("\">"); _buf << ((attr "author_#{idx}"));
918
+ ; _buf << ("</span><br>");
919
+ ; if attr? "email_#{idx}";
920
+ ; _buf << ("<span class=\"email\" id=\"email"); _buf << (idx); _buf << ("\">"); _buf << (sub_macros(attr "email_#{idx}"));
921
+ ; _buf << ("</span>"); end; end; end; end; if attr? :revnumber;
922
+ ; _buf << ("<span id=\"revnumber\">"); _buf << (((attr 'version-label') || '').downcase); _buf << (" "); _buf << (attr :revnumber); _buf << (',' if attr? :revdate); _buf << ("</span> ");
923
+ ;
924
+ ; end; if attr? :revdate;
925
+ ; _buf << ("<time id=\"revdate\""); _slim_codeattributes6 = revdate_iso; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" datetime"); else; _buf << (" datetime=\""); _buf << (_slim_codeattributes6); _buf << ("\""); end; end; _buf << (">"); _buf << ((attr :revdate));
926
+ ; _buf << ("</time>"); end; if attr? :revremark;
927
+ ; _buf << ("<br><span id=\"revremark\">");
928
+ ; _buf << ((attr :revremark));
929
+ ; _buf << ("</span>"); end; _buf << ("</div>"); end; end; if (attr? :toc) && (attr? 'toc-placement', 'auto');
930
+ ; _buf << ("<nav id=\"toc\""); _temple_html_attributeremover2 = []; _slim_codeattributes7 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes7; _slim_codeattributes7 = _slim_codeattributes7.flatten; _slim_codeattributes7.map!(&:to_s); _slim_codeattributes7.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes7.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes7); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _buf << (" role=\"doc-toc\"><h2 id=\"toc-title\">");
931
+ ; _buf << ((document.attr 'toc-title'));
932
+ ; _buf << ("</h2>");
933
+ ; _buf << (converter.convert document, 'outline');
934
+ ; _buf << ("</nav>");
935
+ ; end;
936
+ ; _buf << ("</header>"); end; _buf << ("<div id=\"content\">"); _buf << (document_content);
937
+ ; _buf << ("</div>"); unless !footnotes? || (attr? :nofootnotes);
938
+ ; _buf << ("<section class=\"footnotes\" aria-label=\"Footnotes\" role=\"doc-endnotes\"><hr><ol class=\"footnotes\">");
939
+ ;
940
+ ;
941
+ ; footnotes.each do |fn|;
942
+ ; _buf << ("<li class=\"footnote\""); _slim_codeattributes8 = (footnote_id fn.index); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes8); _buf << ("\""); end; end; _buf << (" role=\"doc-endnote\">");
943
+ ; _buf << ("#{fn.text} ");
944
+ ;
945
+ ;
946
+ ;
947
+ ; _buf << ("<a class=\"footnote-backref\" href=\"#"); _buf << (footnoteref_id fn.index); _buf << ("\" role=\"doc-backlink\" title=\"Jump to the first occurrence in the text\">&#8617;</a></li>");
948
+ ;
949
+ ; end; _buf << ("</ol></section>");
950
+ ; end; unless nofooter;
951
+ ; _buf << ("<footer><div id=\"footer-text\">");
952
+ ;
953
+ ; if attr? :revnumber;
954
+ ; _buf << (attr 'version-label'); _buf << (" "); _buf << (attr :revnumber);
955
+ ; end; if attr? 'last-update-label';
956
+ ; _buf << ("<br>");
957
+ ; _buf << (attr 'last-update-label'); _buf << (" "); _buf << (attr :docdatetime);
958
+ ; end; _buf << ("</div>"); unless (docinfo_content = (docinfo :footer)).empty?;
959
+ ; _buf << (docinfo_content);
960
+ ; end;
961
+ ; _buf << ("</footer>"); end; _buf << ("</body></html>"); _buf = _buf.join("")
867
962
  end
868
963
  end
869
964
 
@@ -880,146 +975,156 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
880
975
  end
881
976
  end
882
977
 
883
- def inline_footnote(node, opts = {})
978
+ def quote(node, opts = {})
884
979
  node.extend(Helpers)
885
980
  node.instance_eval do
886
- _buf = []; if (index = local_attr :index);
887
- ;
888
- ;
981
+ _buf = []; _slim_controls1 = block_with_title :class=>'quote-block' do; _slim_controls2 = [];
982
+ ; _slim_controls2 << ("<blockquote>");
983
+ ; _slim_controls3 = html_tag_if !blocks?, :p do; _slim_controls4 = [];
984
+ ; _slim_controls4 << (content);
985
+ ; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); if attr?(:attribution) || attr?(:citetitle);
986
+ ; _slim_controls2 << ("<footer>&#8212; <cite>");
889
987
  ;
890
988
  ;
891
- ; _buf << ("<a class=\"footnote-ref\""); _slim_codeattributes1 = (footnoteref_id unless type == :xref); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (" href=\"#"); _buf << (footnote_id); _buf << ("\" title=\"View footnote "); _buf << (index); _buf << ("\" role=\"doc-noteref\">[");
892
- ; _buf << (index); _buf << ("]</a>");
893
- ; else;
894
- ; _buf << ("<a class=\"footnote-ref broken\" title=\"Unresolved footnote reference.\">["); _buf << (text); _buf << ("]</a>");
895
- ; end; _buf = _buf.join("")
989
+ ; _slim_controls2 << ([(attr :attribution), (attr :citetitle)].compact.join(', '));
990
+ ; _slim_controls2 << ("</cite></footer>");
991
+ ; end; _slim_controls2 << ("</blockquote>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
896
992
  end
897
993
  end
898
994
 
899
- def inline_break(node, opts = {})
995
+ def image(node, opts = {})
900
996
  node.extend(Helpers)
901
997
  node.instance_eval do
902
- _buf = []; _buf << (text);
903
- ; _buf << ("<br>");
904
- ; _buf = _buf.join("")
998
+ _buf = []; _slim_controls1 = block_with_caption(:bottom, :class=>'image-block', :style=>style_value(text_align: (attr :align), float: (attr :float))) do; _slim_controls2 = [];
999
+ ; target_url = image_uri(attr :target);
1000
+ ; _slim_controls3 = html_tag_if(image_link, :a,
1001
+ :class=>['image', ('bare' if image_link == target_url)],
1002
+ :href=>image_link,
1003
+ :title=>image_link_label,
1004
+ 'aria-label'=>image_link_label,
1005
+ :target=>(attr :window),
1006
+ :rel=>link_rel) do; _slim_controls4 = [];
1007
+ ; _slim_controls4 << ("<img"); _slim_codeattributes1 = target_url; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls4 << (" src"); else; _slim_controls4 << (" src=\""); _slim_controls4 << (_slim_codeattributes1); _slim_controls4 << ("\""); end; end; _slim_codeattributes2 = (attr :alt); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls4 << (" alt"); else; _slim_controls4 << (" alt=\""); _slim_controls4 << (_slim_codeattributes2); _slim_controls4 << ("\""); end; end; _slim_codeattributes3 = (attr :width); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls4 << (" width"); else; _slim_controls4 << (" width=\""); _slim_controls4 << (_slim_codeattributes3); _slim_controls4 << ("\""); end; end; _slim_codeattributes4 = (attr :height); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls4 << (" height"); else; _slim_controls4 << (" height=\""); _slim_controls4 << (_slim_codeattributes4); _slim_controls4 << ("\""); end; end; _slim_codeattributes5 = (attr :loading); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls4 << (" loading"); else; _slim_controls4 << (" loading=\""); _slim_controls4 << (_slim_codeattributes5); _slim_controls4 << ("\""); end; end; _slim_controls4 << (">");
1008
+ ; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
905
1009
  end
906
1010
  end
907
1011
 
908
- def stem(node, opts = {})
1012
+ def colist(node, opts = {})
909
1013
  node.extend(Helpers)
910
1014
  node.instance_eval do
911
- _buf = []; _slim_controls1 = block_with_caption :top, :class=>'stem-block' do; _slim_controls2 = [];
912
- ; _slim_controls2 << ("<div class=\"math\""); _slim_codeattributes1 = stem_lang; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << ((delimit_stem content, style));
913
- ; _slim_controls2 << ("</div>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1015
+ _buf = [];
1016
+ ; _buf << ("<ol"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "callout-list"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = [style, role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1017
+ ; items.each do |item|;
1018
+ ; _buf << ("<li>"); _buf << (item.text);
1019
+ ; _buf << ("</li>"); end; _buf << ("</ol>"); _buf = _buf.join("")
914
1020
  end
915
1021
  end
916
1022
 
917
- def olist(node, opts = {})
1023
+ def pass(node, opts = {})
918
1024
  node.extend(Helpers)
919
1025
  node.instance_eval do
920
- _buf = []; _slim_controls1 = block_with_title :class=>['olist', style] do; _slim_controls2 = [];
921
- ; _slim_controls2 << ("<ol"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = style; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = (attr :start); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" start"); else; _slim_controls2 << (" start=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_codeattributes3 = list_marker_keyword; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" type"); else; _slim_controls2 << (" type=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_codeattributes4 = (option? 'reversed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" reversed"); else; _slim_controls2 << (" reversed=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
922
- ; items.each do |item|;
923
- ; _slim_controls2 << ("<li>"); _slim_controls2 << ((print_item_content item));
924
- ; _slim_controls2 << ("</li>"); end; _slim_controls2 << ("</ol>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1026
+ _buf = []; _buf << (content);
1027
+ ; _buf = _buf.join("")
925
1028
  end
926
1029
  end
927
1030
 
928
- def dlist(node, opts = {})
1031
+ def inline_menu(node, opts = {})
929
1032
  node.extend(Helpers)
930
1033
  node.instance_eval do
931
- _buf = []; case style;
932
- ; when 'qanda';
933
- ; _slim_controls1 = block_with_title :class=>'qlist qanda', :role=>'doc-qna' do; _slim_controls2 = [];
934
- ; _slim_controls2 << ("<dl class=\"qanda\">");
935
- ; items.each do |questions, answer|;
936
- ; [*questions].each do |question|;
937
- ; _slim_controls2 << ("<dt class=\"qanda-question\">"); _slim_controls2 << (question.text);
938
- ; _slim_controls2 << ("</dt>"); end; unless answer.nil?;
939
- ; _slim_controls2 << ("<dd class=\"qanda-answer\">");
940
- ; if answer.text?;
941
- ; _slim_controls3 = html_tag_if answer.blocks?, :p do; _slim_controls4 = [];
942
- ; _slim_controls4 << (answer.text);
943
- ; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); end; if answer.blocks?;
944
- ; _slim_controls2 << (answer.content);
945
- ; end; _slim_controls2 << ("</dd>"); end; end; _slim_controls2 << ("</dl>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1);
946
- ; when 'horizontal';
947
- ; _slim_controls5 = block_with_title :class=>'hdlist' do; _slim_controls6 = [];
948
- ; _slim_controls6 << ("<table>");
949
- ; if (attr? :labelwidth) || (attr? :itemwidth);
950
- ; _slim_controls6 << ("<colgroup><col");
951
- ; _slim_codeattributes1 = style_value(width: [(attr :labelwidth), '%']); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls6 << (" style"); else; _slim_controls6 << (" style=\""); _slim_controls6 << (_slim_codeattributes1); _slim_controls6 << ("\""); end; end; _slim_controls6 << ("><col");
952
- ; _slim_codeattributes2 = style_value(width: [(attr :itemwidth), '%']); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls6 << (" style"); else; _slim_controls6 << (" style=\""); _slim_controls6 << (_slim_codeattributes2); _slim_controls6 << ("\""); end; end; _slim_controls6 << ("></colgroup>");
953
- ; end; items.each do |terms, dd|;
954
- ; _slim_controls6 << ("<tr><th");
955
- ; _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "hdlist1"; _temple_html_attributemerger1[1] = []; _slim_codeattributes3 = ('strong' if option? 'strong'); if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes3.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes3); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls6 << (" class=\""); _slim_controls6 << (_temple_html_attributeremover1); _slim_controls6 << ("\""); end; _slim_controls6 << (">");
956
- ; terms = [*terms];
957
- ; terms.each_with_index do |dt, idx|;
958
- ; _slim_controls6 << (dt.text);
959
- ; unless idx >= terms.count - 1;
960
- ; _slim_controls6 << ("<br>");
961
- ; end; end; _slim_controls6 << ("</th><td class=\"hdlist2\">");
962
- ; unless dd.nil?;
963
- ; if dd.text?;
964
- ; _slim_controls6 << ("<p>"); _slim_controls6 << (dd.text);
965
- ; _slim_controls6 << ("</p>"); end; if dd.blocks?;
966
- ; _slim_controls6 << (dd.content);
967
- ; end; end; _slim_controls6 << ("</td></tr>"); end; _slim_controls6 << ("</table>"); _slim_controls6 = _slim_controls6.join(""); end; _buf << (_slim_controls5);
968
- ; else;
969
- ; _slim_controls7 = block_with_title :class=>['dlist', style] do; _slim_controls8 = [];
970
- ; _slim_controls8 << ("<dl>");
1034
+ _buf = []; if local_attr :menuitem;
1035
+ ; capture do;
1036
+ ; _buf << ("&#160;<span class=\"caret\">&#8250;</span>&#32;");
1037
+ ;
1038
+ ;
1039
+ ; end; _buf << ("<kbd class=\"menuseq\"><kbd class=\"menu\"><samp>");
1040
+ ;
1041
+ ; _buf << ((attr :menu));
1042
+ ; _buf << ("</samp></kbd>"); yield_capture;
1043
+ ; (attr 'submenus').each do |submenu|;
1044
+ ; _buf << ("<kbd class=\"menu\"><samp>");
1045
+ ; _buf << (submenu);
1046
+ ; _buf << ("</samp></kbd>"); yield_capture;
1047
+ ; end; _buf << ("<kbd class=\"menu\"><samp>");
1048
+ ; _buf << ((local_attr :menuitem));
1049
+ ; _buf << ("</samp></kbd></kbd>"); else;
1050
+ ; _buf << ("<kbd class=\"menu\"><samp>");
1051
+ ; _buf << ((attr :menu));
1052
+ ; _buf << ("</samp></kbd>"); end; _buf = _buf.join("")
1053
+ end
1054
+ end
1055
+
1056
+ def dlist(node, opts = {})
1057
+ node.extend(Helpers)
1058
+ node.instance_eval do
1059
+ _buf = []; _slim_controls1 = block_with_title :class=>['dlist', style], :role=>('doc-qna' if style == 'qanda') do; _slim_controls2 = [];
1060
+ ; _slim_controls2 << ("<dl"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = style; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << (">");
971
1061
  ; items.each do |terms, dd|;
972
1062
  ; [*terms].each do |dt|;
973
- ; _slim_controls8 << ("<dt>"); _slim_controls8 << (dt.text);
974
- ; _slim_controls8 << ("</dt>"); end; unless dd.nil?;
975
- ; _slim_controls8 << ("<dd>"); _slim_controls8 << ((print_item_content dd));
976
- ; _slim_controls8 << ("</dd>"); end; end; _slim_controls8 << ("</dl>"); _slim_controls8 = _slim_controls8.join(""); end; _buf << (_slim_controls7); end; _buf = _buf.join("")
1063
+ ; _slim_controls2 << ("<dt>"); _slim_controls2 << (dt.text);
1064
+ ; _slim_controls2 << ("</dt>"); end; unless dd.nil?;
1065
+ ; _slim_controls2 << ("<dd>"); _slim_controls2 << ((print_item_content dd));
1066
+ ; _slim_controls2 << ("</dd>"); end; end; _slim_controls2 << ("</dl>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
977
1067
  end
978
1068
  end
979
1069
 
980
- def table(node, opts = {})
1070
+ def inline_indexterm(node, opts = {})
981
1071
  node.extend(Helpers)
982
1072
  node.instance_eval do
983
- _buf = []; _slim_controls1 = block_with_caption :top, :class=>'table-block' do; _slim_controls2 = [];
984
- ;
1073
+ _buf = []; if type == :visible;
1074
+ ; _buf << (text);
1075
+ ; end; _buf = _buf.join("")
1076
+ end
1077
+ end
1078
+
1079
+ def toc(node, opts = {})
1080
+ node.extend(Helpers)
1081
+ node.instance_eval do
1082
+ _buf = [];
985
1083
  ;
986
- ; _slim_controls2 << ("<table"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = ["frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", spread?]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = style_value(width: ("#{attr :tablepcwidth}%" if !autowidth? && !spread? || (local_attr :width)),
987
- float: (attr :float)); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" style"); else; _slim_controls2 << (" style=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
988
- ; unless (attr :rowcount).zero?;
989
- ; _slim_controls2 << ("<colgroup>");
990
- ; if autowidth?;
991
- ; columns.each do;
992
- ; _slim_controls2 << ("<col>");
993
- ; end; else;
994
- ; columns.each do |col|;
995
- ; _slim_controls2 << ("<col style=\"width: "); _slim_controls2 << (col.attr :colpcwidth); _slim_controls2 << ("%;\">");
996
- ; end; end; _slim_controls2 << ("</colgroup>"); [:head, :foot, :body].reject { |tblsec| rows[tblsec].empty? }.each do |tblsec|;
997
- ; _slim_controls2 << ("<t"); _slim_controls2 << (tblsec); _slim_controls2 << (">");
998
- ; rows[tblsec].each do |row|;
999
- ; _slim_controls2 << ("<tr>");
1000
- ; row.each do |cell|;
1001
- ; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
1002
- :class=>["halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
1003
- :colspan=>cell.colspan,
1004
- :rowspan=>cell.rowspan,
1005
- :style=>style_value(background_color: (document.attr :cellbgcolor))) do; _slim_controls4 = [];
1006
- ; if tblsec == :head;
1007
- ; _slim_controls4 << (cell.text);
1008
- ; else;
1009
- ; case cell.style;
1010
- ; when :asciidoc;
1011
- ; _slim_controls4 << (cell.content);
1012
- ; when :verse;
1013
- ; _slim_controls4 << ("<div class=\"verse\"><pre>"); _slim_controls4 << (cell.text);
1014
- ; _slim_controls4 << ("</pre></div>"); when :literal;
1015
- ; _slim_controls4 << ("<div class=\"literal\"><pre>"); _slim_controls4 << (cell.text);
1016
- ; _slim_controls4 << ("</pre></div>"); else;
1017
- ; if cell.content.one?;
1018
- ; _slim_controls4 << (cell.content.first);
1019
- ; else;
1020
- ; cell.content.each do |text|;
1021
- ; _slim_controls4 << ("<p>"); _slim_controls4 << (text);
1022
- ; _slim_controls4 << ("</p>"); end; end; end; end; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); end; _slim_controls2 << ("</tr>"); end; end; end; _slim_controls2 << ("</table>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1084
+ ; if document.attr?(:toc) && document.sections?;
1085
+ ; toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'));
1086
+ ; _buf << ("<nav"); _slim_codeattributes1 = toc_id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = (attr :role, (document.attr 'toc-class', 'toc')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (" role=\"doc-toc\">");
1087
+ ; _slim_htag_filter1 = ((level + 2)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes3 = ("#{toc_id}-title" if toc_id); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _buf << (">");
1088
+ ; _buf << ((title || (document.attr 'toc-title')));
1089
+ ; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">");
1090
+ ; _buf << (converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels));
1091
+ ; _buf << ("</nav>"); else;
1092
+ ; _buf << ("<!--toc disabled-->");
1093
+ ; end; _buf = _buf.join("")
1094
+ end
1095
+ end
1096
+
1097
+ def ulist(node, opts = {})
1098
+ node.extend(Helpers)
1099
+ node.instance_eval do
1100
+ _buf = []; checklist = 'task-list' if option? 'checklist';
1101
+ ; _slim_controls1 = block_with_title :class=>['ulist', style] do; _slim_controls2 = [];
1102
+ ; _slim_controls2 << ("<ul"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = (checklist || style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << (">");
1103
+ ; items.each do |item|;
1104
+ ; if checklist && (item.attr? :checkbox);
1105
+ ; _slim_controls2 << ("<li"); _temple_html_attributeremover2 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "task-list-item"; _temple_html_attributemerger1[1] = []; _slim_codeattributes2 = item.role; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes2.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes2); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover2 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_codeattributes3 = item.id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" id"); else; _slim_controls2 << (" id=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_controls2 << ("><input class=\"task-list-item-checkbox\" type=\"checkbox\" disabled");
1106
+ ; _slim_codeattributes4 = (item.attr? :checked); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" checked"); else; _slim_controls2 << (" checked=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << ("> ");
1107
+ ; _slim_controls2 << (item.text);
1108
+ ; _slim_controls2 << ("</li>"); else;
1109
+ ; _slim_controls2 << ("<li"); _slim_codeattributes5 = item.id; if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" id"); else; _slim_controls2 << (" id=\""); _slim_controls2 << (_slim_codeattributes5); _slim_controls2 << ("\""); end; end; _temple_html_attributeremover3 = []; _slim_codeattributes6 = item.role; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes6.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes6); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover3); _slim_controls2 << ("\""); end; _slim_controls2 << (">");
1110
+ ; _slim_controls2 << ((print_item_content item));
1111
+ ; _slim_controls2 << ("</li>"); end; end; _slim_controls2 << ("</ul>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1112
+ end
1113
+ end
1114
+
1115
+ def inline_button(node, opts = {})
1116
+ node.extend(Helpers)
1117
+ node.instance_eval do
1118
+ _buf = []; _buf << ("<kbd class=\"button\"><samp>");
1119
+ ; _buf << (text);
1120
+ ; _buf << ("</samp></kbd>"); _buf = _buf.join("")
1121
+ end
1122
+ end
1123
+
1124
+ def empty(node, opts = {})
1125
+ node.extend(Helpers)
1126
+ node.instance_eval do
1127
+ _buf = []; ; _buf = _buf.join("")
1023
1128
  end
1024
1129
  end
1025
1130
 
@@ -1027,179 +1132,327 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
1027
1132
  node.extend(Helpers)
1028
1133
  node.instance_eval do
1029
1134
  _buf = []; if (keys = attr 'keys').size == 1;
1030
- ; _buf << ("<kbd>"); _buf << (keys.first);
1135
+ ; _buf << ("<kbd class=\"key\">"); _buf << (keys.first);
1031
1136
  ; _buf << ("</kbd>"); else;
1032
1137
  ; _buf << ("<kbd class=\"keyseq\">");
1033
1138
  ; keys.each_with_index do |key, idx|;
1034
1139
  ; _buf << ("+" unless idx.zero?);
1035
- ; _buf << ("<kbd>"); _buf << (key);
1140
+ ; _buf << ("<kbd class=\"key\">"); _buf << (key);
1036
1141
  ; _buf << ("</kbd>"); end; _buf << ("</kbd>"); end; _buf = _buf.join("")
1037
1142
  end
1038
1143
  end
1039
1144
 
1040
- def empty(node, opts = {})
1145
+ def outline(node, opts = {})
1041
1146
  node.extend(Helpers)
1042
1147
  node.instance_eval do
1043
- _buf = []; ; _buf = _buf.join("")
1148
+ _buf = []; unless sections.empty?;
1149
+ ;
1150
+ ; toclevels ||= opts[:toclevels] || (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
1151
+ ; slevel = section_level sections.first;
1152
+ ; _buf << ("<ol class=\"toc-list level-"); _buf << (slevel); _buf << ("\">");
1153
+ ; sections.each do |sec|;
1154
+ ; _buf << ("<li><a href=\"#");
1155
+ ; _buf << (sec.id); _buf << ("\">"); _buf << ((section_title sec, drop_anchors: true));
1156
+ ; _buf << ("</a>"); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
1157
+ ; _buf << (child_toc);
1158
+ ; end; _buf << ("</li>"); end; _buf << ("</ol>"); end; _buf = _buf.join("")
1044
1159
  end
1045
1160
  end
1046
1161
 
1047
- def pass(node, opts = {})
1162
+ def inline_image(node, opts = {})
1048
1163
  node.extend(Helpers)
1049
1164
  node.instance_eval do
1050
- _buf = []; _buf << (content);
1051
- ; _buf = _buf.join("")
1165
+ _buf = []; _slim_controls1 = html_tag_if((attr? :link), :a, :class=>'image', :href=>(attr :link), :target=>(attr :window), :rel=>link_rel) do; _slim_controls2 = [];
1166
+ ; if type == 'icon' && (document.attr? :icons, 'font');
1167
+ ; _slim_controls2 << ("<i"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = [*icon_fa_classes, role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = (attr :title); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_controls2 << ("></i>");
1168
+ ; elsif type == 'icon' && !(document.attr? :icons);
1169
+ ; _slim_controls2 << ("<b"); _temple_html_attributeremover2 = []; _slim_codeattributes3 = ['icon', role]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes3.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes3); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_codeattributes4 = (attr :title); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">[");
1170
+ ; _slim_controls2 << (attr :alt); _slim_controls2 << ("]</b>");
1171
+ ; else;
1172
+ ;
1173
+ ;
1174
+ ; _slim_controls2 << ("<img"); _slim_codeattributes5 = (type == 'icon' ? (icon_uri target) : (image_uri target)); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes5); _slim_controls2 << ("\""); end; end; _slim_codeattributes6 = (attr :alt); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" alt"); else; _slim_controls2 << (" alt=\""); _slim_controls2 << (_slim_codeattributes6); _slim_controls2 << ("\""); end; end; _slim_codeattributes7 = (attr :width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width"); else; _slim_controls2 << (" width=\""); _slim_controls2 << (_slim_codeattributes7); _slim_controls2 << ("\""); end; end; _slim_codeattributes8 = (attr :height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height"); else; _slim_controls2 << (" height=\""); _slim_controls2 << (_slim_codeattributes8); _slim_controls2 << ("\""); end; end; _slim_codeattributes9 = (attr :title); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes9); _slim_controls2 << ("\""); end; end; _slim_codeattributes10 = (attr :loading); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" loading"); else; _slim_controls2 << (" loading=\""); _slim_controls2 << (_slim_codeattributes10); _slim_controls2 << ("\""); end; end; _temple_html_attributeremover3 = []; _slim_codeattributes11 = [(type if type != 'image'), role]; if Array === _slim_codeattributes11; _slim_codeattributes11 = _slim_codeattributes11.flatten; _slim_codeattributes11.map!(&:to_s); _slim_codeattributes11.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes11.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes11); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover3); _slim_controls2 << ("\""); end; _slim_codeattributes12 = style_value(float: (attr :float)); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" style"); else; _slim_controls2 << (" style=\""); _slim_controls2 << (_slim_codeattributes12); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
1175
+ ; end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1052
1176
  end
1053
1177
  end
1054
1178
 
1055
- def inline_anchor(node, opts = {})
1179
+ def example(node, opts = {})
1056
1180
  node.extend(Helpers)
1057
1181
  node.instance_eval do
1058
- _buf = []; case type;
1059
- ; when :xref;
1060
- ; _buf << ("<a"); _slim_codeattributes1 = target; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" href"); else; _buf << (" href=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (">"); _buf << (xref_text);
1061
- ; _buf << ("</a>"); when :ref;
1062
- ;
1063
- ; _buf << ("<a"); _slim_codeattributes2 = (id || target); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (" aria-hidden=\"true\"></a>");
1064
- ; when :bibref;
1065
- ;
1066
- ; _buf << ("<a"); _slim_codeattributes3 = (id || target); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _buf << (" aria-hidden=\"true\"></a>");
1067
- ; _buf << (bibref_text);
1068
- ; else;
1069
- ; _buf << ("<a"); _slim_codeattributes4 = id; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes4); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes5 = role; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes5.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes5); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes6 = target; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" href"); else; _buf << (" href=\""); _buf << (_slim_codeattributes6); _buf << ("\""); end; end; _slim_codeattributes7 = (attr :window); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" target"); else; _buf << (" target=\""); _buf << (_slim_codeattributes7); _buf << ("\""); end; end; _slim_codeattributes8 = link_rel; if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" rel"); else; _buf << (" rel=\""); _buf << (_slim_codeattributes8); _buf << ("\""); end; end; _slim_codeattributes9 = (attr :title); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" title"); else; _buf << (" title=\""); _buf << (_slim_codeattributes9); _buf << ("\""); end; end; _buf << (">"); _buf << (text);
1070
- ; _buf << ("</a>"); end; _buf = _buf.join("")
1182
+ _buf = []; if option? :collapsible;
1183
+ ; _buf << ("<details"); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = role; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes3 = (option? :open); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" open"); else; _buf << (" open=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _buf << (">");
1184
+ ; if title;
1185
+ ; _buf << ("<summary>");
1186
+ ; _buf << (title);
1187
+ ; _buf << ("</summary>"); end; _buf << ("<div class=\"content\">");
1188
+ ; _buf << (content);
1189
+ ; _buf << ("</div></details>"); else;
1190
+ ; _slim_controls1 = block_with_caption :top, :class=>'example-block' do; _slim_controls2 = [];
1191
+ ; _slim_controls2 << ("<div class=\"example\">");
1192
+ ; _slim_controls2 << (content);
1193
+ ; _slim_controls2 << ("</div>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); end; _buf = _buf.join("")
1071
1194
  end
1072
1195
  end
1073
1196
 
1074
- def preamble(node, opts = {})
1197
+ def section(node, opts = {})
1075
1198
  node.extend(Helpers)
1076
1199
  node.instance_eval do
1077
- _buf = []; _buf << ("<section id=\"preamble\" aria-label=\"Preamble\">");
1078
- ; _buf << (content);
1079
- ; _buf << ("</section>"); if (document.attr? :toc) && (document.attr? 'toc-placement', 'preamble');
1080
- ; _buf << ("<nav id=\"toc\""); _temple_html_attributeremover1 = []; _slim_codeattributes1 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (" role=\"doc-toc\"><h2 id=\"toc-title\">");
1081
- ; _buf << ((document.attr 'toc-title'));
1082
- ; _buf << ("</h2>");
1083
- ; _buf << (converter.convert document, 'outline');
1084
- ; _buf << ("</nav>");
1085
- ; end; _buf = _buf.join("")
1200
+ _buf = []; _buf << ("<section"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "doc-section"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = ["level-#{section_level}", role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">");
1201
+ ; _slim_htag_filter1 = ((section_level + 1)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1202
+ ; if id;
1203
+ ; if document.attr? :sectanchors;
1204
+ ; _buf << ("<a class=\"anchor\" href=\"#"); _buf << (id); _buf << ("\" aria-hidden=\"true\"></a>");
1205
+ ; end; if document.attr? :sectlinks;
1206
+ ; _buf << ("<a class=\"link\" href=\"#"); _buf << (id); _buf << ("\">"); _buf << (section_title);
1207
+ ; _buf << ("</a>"); else;
1208
+ ; _buf << (section_title);
1209
+ ; end; else;
1210
+ ; _buf << (section_title);
1211
+ ; end; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">"); _buf << (content);
1212
+ ; _buf << ("</section>"); _buf = _buf.join("")
1086
1213
  end
1087
1214
  end
1088
1215
 
1089
- def quote(node, opts = {})
1216
+ def admonition(node, opts = {})
1090
1217
  node.extend(Helpers)
1091
1218
  node.instance_eval do
1092
- _buf = []; _slim_controls1 = block_with_title :class=>'quote-block' do; _slim_controls2 = [];
1093
- ; _slim_controls2 << ("<blockquote>");
1094
- ; _slim_controls3 = html_tag_if !blocks?, :p do; _slim_controls4 = [];
1095
- ; _slim_controls4 << (content);
1096
- ; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); if attr?(:attribution) || attr?(:citetitle);
1097
- ; _slim_controls2 << ("<footer>&#8212; <cite>");
1219
+ _buf = []; capture do;
1220
+ ; _buf << ("<h6"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "block-title"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = ('label-only' unless title?); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << ("><span class=\"title-label\">");
1221
+ ; _buf << ("#{local_attr :textlabel}: ");
1222
+ ; _buf << ("</span>"); _buf << (title);
1223
+ ; _buf << ("</h6>"); _slim_controls1 = html_tag_if !blocks?, :p do; _slim_controls2 = [];
1224
+ ; _slim_controls2 << (content);
1225
+ ; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); end; if admonition_aside?;
1226
+ ; _buf << ("<aside"); _temple_html_attributeremover2 = []; _temple_html_attributemerger2 = []; _temple_html_attributemerger2[0] = "admonition-block"; _temple_html_attributemerger2[1] = []; _slim_codeattributes2 = [(attr :name), role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributemerger2[1] << (_slim_codeattributes2.join(" ")); else; _temple_html_attributemerger2[1] << (_slim_codeattributes2); end; _temple_html_attributemerger2[1] = _temple_html_attributemerger2[1].join(""); _temple_html_attributeremover2 << (_temple_html_attributemerger2.reject(&:empty?).join(" ")); _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _slim_codeattributes4 = admonition_aria; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" role"); else; _buf << (" role=\""); _buf << (_slim_codeattributes4); _buf << ("\""); end; end; _buf << (">");
1227
+ ; yield_capture;
1228
+ ; _buf << ("</aside>"); else;
1229
+ ; _buf << ("<section"); _temple_html_attributeremover3 = []; _temple_html_attributemerger3 = []; _temple_html_attributemerger3[0] = "admonition-block"; _temple_html_attributemerger3[1] = []; _slim_codeattributes5 = [(attr :name), role]; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributemerger3[1] << (_slim_codeattributes5.join(" ")); else; _temple_html_attributemerger3[1] << (_slim_codeattributes5); end; _temple_html_attributemerger3[1] = _temple_html_attributemerger3[1].join(""); _temple_html_attributeremover3 << (_temple_html_attributemerger3.reject(&:empty?).join(" ")); _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover3); _buf << ("\""); end; _slim_codeattributes6 = id; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes6); _buf << ("\""); end; end; _slim_codeattributes7 = admonition_aria; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" role"); else; _buf << (" role=\""); _buf << (_slim_codeattributes7); _buf << ("\""); end; end; _buf << (">");
1230
+ ; yield_capture;
1231
+ ; _buf << ("</section>"); end; _buf = _buf.join("")
1232
+ end
1233
+ end
1234
+
1235
+ def listing(node, opts = {})
1236
+ node.extend(Helpers)
1237
+ node.instance_eval do
1238
+ _buf = []; _slim_controls1 = block_with_caption :top, :class=>'listing-block' do; _slim_controls2 = [];
1239
+ ; if style == 'source';
1240
+ ; highlighter = document.attr('source-highlighter');
1098
1241
  ;
1242
+ ; if defined?(::Asciidoctor::SyntaxHighlighter) && document.syntax_highlighter;
1243
+ ; _slim_controls2 << (formatted_source);
1099
1244
  ;
1100
- ; _slim_controls2 << ([(attr :attribution), (attr :citetitle)].compact.join(', '));
1101
- ; _slim_controls2 << ("</cite></footer>");
1102
- ; end; _slim_controls2 << ("</blockquote>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1245
+ ; elsif highlighter == 'html-pipeline';
1246
+ ; _slim_controls2 << ("<pre><code"); _slim_codeattributes1 = source_lang; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << (content);
1247
+ ; _slim_controls2 << ("</code></pre>"); else;
1248
+ ;
1249
+ ; _slim_controls2 << ("<pre"); _temple_html_attributeremover1 = []; _slim_codeattributes2 = [highlighter, 'highlight', ('linenums' if attr? :linenums), nowrap?]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << ("><code");
1250
+ ; _temple_html_attributeremover2 = []; _slim_codeattributes3 = source_code_class; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes3.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes3); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_codeattributes4 = source_lang; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << (content);
1251
+ ; _slim_controls2 << ("</code></pre>"); end; else;
1252
+ ; _slim_controls2 << ("<pre"); _temple_html_attributeremover3 = []; _slim_codeattributes5 = nowrap?; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes5.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes5); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover3); _slim_controls2 << ("\""); end; _slim_controls2 << (">"); _slim_controls2 << (content);
1253
+ ; _slim_controls2 << ("</pre>");
1254
+ ;
1255
+ ; end; if callout_list;
1256
+ ; _slim_controls2 << (converter.convert callout_list, 'colist');
1257
+ ; end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1258
+ end
1259
+ end
1260
+
1261
+ def thematic_break(node, opts = {})
1262
+ node.extend(Helpers)
1263
+ node.instance_eval do
1264
+ _buf = []; _buf << ("<hr>");
1265
+ ; _buf = _buf.join("")
1103
1266
  end
1104
1267
  end
1105
1268
 
1106
1269
  def inline_quoted(node, opts = {})
1107
1270
  node.extend(Helpers)
1108
1271
  node.instance_eval do
1109
- _buf = []; unless id.nil?;
1110
- ; _buf << ("<a"); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (" aria-hidden=\"true\"></a>");
1111
- ; end; case type;
1272
+ _buf = []; case type;
1112
1273
  ; when :emphasis;
1113
- ; _buf << ("<em"); _temple_html_attributeremover1 = []; _slim_codeattributes2 = role; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">"); _buf << (text);
1274
+ ; _buf << ("<em"); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = role; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">"); _buf << (text);
1114
1275
  ; _buf << ("</em>"); when :strong;
1115
- ; _buf << ("<strong"); _temple_html_attributeremover2 = []; _slim_codeattributes3 = role; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes3.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes3); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _buf << (">"); _buf << (text);
1276
+ ; _buf << ("<strong"); _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _temple_html_attributeremover2 = []; _slim_codeattributes4 = role; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes4.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes4); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _buf << (">"); _buf << (text);
1116
1277
  ; _buf << ("</strong>"); when :monospaced;
1117
- ; _buf << ("<code"); _temple_html_attributeremover3 = []; _slim_codeattributes4 = role; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes4.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes4); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover3); _buf << ("\""); end; _buf << (">"); _buf << (text);
1278
+ ; _buf << ("<code"); _slim_codeattributes5 = id; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes5); _buf << ("\""); end; end; _temple_html_attributeremover3 = []; _slim_codeattributes6 = role; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes6.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes6); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover3); _buf << ("\""); end; _buf << (">"); _buf << (text);
1118
1279
  ; _buf << ("</code>"); when :superscript;
1119
- ; _buf << ("<sup"); _temple_html_attributeremover4 = []; _slim_codeattributes5 = role; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover4 << (_slim_codeattributes5.join(" ")); else; _temple_html_attributeremover4 << (_slim_codeattributes5); end; _temple_html_attributeremover4 = _temple_html_attributeremover4.join(""); if !_temple_html_attributeremover4.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover4); _buf << ("\""); end; _buf << (">"); _buf << (text);
1280
+ ; _buf << ("<sup"); _slim_codeattributes7 = id; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes7); _buf << ("\""); end; end; _temple_html_attributeremover4 = []; _slim_codeattributes8 = role; if Array === _slim_codeattributes8; _slim_codeattributes8 = _slim_codeattributes8.flatten; _slim_codeattributes8.map!(&:to_s); _slim_codeattributes8.reject!(&:empty?); _temple_html_attributeremover4 << (_slim_codeattributes8.join(" ")); else; _temple_html_attributeremover4 << (_slim_codeattributes8); end; _temple_html_attributeremover4 = _temple_html_attributeremover4.join(""); if !_temple_html_attributeremover4.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover4); _buf << ("\""); end; _buf << (">"); _buf << (text);
1120
1281
  ; _buf << ("</sup>"); when :subscript;
1121
- ; _buf << ("<sub"); _temple_html_attributeremover5 = []; _slim_codeattributes6 = role; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover5 << (_slim_codeattributes6.join(" ")); else; _temple_html_attributeremover5 << (_slim_codeattributes6); end; _temple_html_attributeremover5 = _temple_html_attributeremover5.join(""); if !_temple_html_attributeremover5.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover5); _buf << ("\""); end; _buf << (">"); _buf << (text);
1282
+ ; _buf << ("<sub"); _slim_codeattributes9 = id; if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes9); _buf << ("\""); end; end; _temple_html_attributeremover5 = []; _slim_codeattributes10 = role; if Array === _slim_codeattributes10; _slim_codeattributes10 = _slim_codeattributes10.flatten; _slim_codeattributes10.map!(&:to_s); _slim_codeattributes10.reject!(&:empty?); _temple_html_attributeremover5 << (_slim_codeattributes10.join(" ")); else; _temple_html_attributeremover5 << (_slim_codeattributes10); end; _temple_html_attributeremover5 = _temple_html_attributeremover5.join(""); if !_temple_html_attributeremover5.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover5); _buf << ("\""); end; _buf << (">"); _buf << (text);
1122
1283
  ; _buf << ("</sub>"); when :mark;
1123
- ; _buf << ("<mark"); _temple_html_attributeremover6 = []; _slim_codeattributes7 = role; if Array === _slim_codeattributes7; _slim_codeattributes7 = _slim_codeattributes7.flatten; _slim_codeattributes7.map!(&:to_s); _slim_codeattributes7.reject!(&:empty?); _temple_html_attributeremover6 << (_slim_codeattributes7.join(" ")); else; _temple_html_attributeremover6 << (_slim_codeattributes7); end; _temple_html_attributeremover6 = _temple_html_attributeremover6.join(""); if !_temple_html_attributeremover6.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover6); _buf << ("\""); end; _buf << (">"); _buf << (text);
1284
+ ; _buf << ("<mark"); _slim_codeattributes11 = id; if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes11); _buf << ("\""); end; end; _temple_html_attributeremover6 = []; _slim_codeattributes12 = role; if Array === _slim_codeattributes12; _slim_codeattributes12 = _slim_codeattributes12.flatten; _slim_codeattributes12.map!(&:to_s); _slim_codeattributes12.reject!(&:empty?); _temple_html_attributeremover6 << (_slim_codeattributes12.join(" ")); else; _temple_html_attributeremover6 << (_slim_codeattributes12); end; _temple_html_attributeremover6 = _temple_html_attributeremover6.join(""); if !_temple_html_attributeremover6.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover6); _buf << ("\""); end; _buf << (">"); _buf << (text);
1124
1285
  ; _buf << ("</mark>"); when :double;
1125
- ; _slim_controls1 = html_tag_if role?, :span, :class=>role do; _slim_controls2 = [];
1286
+ ; _slim_controls1 = html_tag_if role? || id, :span, :id=>id, :class=>role do; _slim_controls2 = [];
1126
1287
  ; _slim_controls2 << ((double_quoted text));
1127
1288
  ; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); when :single;
1128
- ; _slim_controls3 = html_tag_if role?, :span, :class=>role do; _slim_controls4 = [];
1289
+ ; _slim_controls3 = html_tag_if role? || id, :span, :id=>id, :class=>role do; _slim_controls4 = [];
1129
1290
  ; _slim_controls4 << ((single_quoted text));
1130
1291
  ; _slim_controls4 = _slim_controls4.join(""); end; _buf << (_slim_controls3); when :asciimath, :latexmath;
1131
- ; _buf << ("<span class=\"math\""); _slim_codeattributes8 = stem_lang; if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-lang"); else; _buf << (" data-lang=\""); _buf << (_slim_codeattributes8); _buf << ("\""); end; end; _buf << (">"); _buf << ((delimit_stem text, type));
1292
+ ; _buf << ("<span class=\"math\""); _slim_codeattributes13 = id; if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes13); _buf << ("\""); end; end; _slim_codeattributes14 = stem_lang; if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-lang"); else; _buf << (" data-lang=\""); _buf << (_slim_codeattributes14); _buf << ("\""); end; end; _buf << (">"); _buf << ((delimit_stem text, type));
1132
1293
  ; _buf << ("</span>"); else;
1133
- ; if role == 'line-through' || role == 'del';
1134
- ; _buf << ("<del>"); _buf << (text);
1135
- ; _buf << ("</del>"); else;
1136
- ; _slim_controls5 = html_tag_if role?, :span, :class=>role do; _slim_controls6 = [];
1294
+ ; case role;
1295
+ ; when 'line-through', 'strike';
1296
+ ; _buf << ("<s"); _slim_codeattributes15 = id; if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes15); _buf << ("\""); end; end; _buf << (">"); _buf << (text);
1297
+ ; _buf << ("</s>"); when 'del';
1298
+ ; _buf << ("<del"); _slim_codeattributes16 = id; if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes16); _buf << ("\""); end; end; _buf << (">"); _buf << (text);
1299
+ ; _buf << ("</del>"); when 'ins';
1300
+ ; _buf << ("<ins"); _slim_codeattributes17 = id; if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes17); _buf << ("\""); end; end; _buf << (">"); _buf << (text);
1301
+ ; _buf << ("</ins>"); else;
1302
+ ; _slim_controls5 = html_tag_if role? || id, :span, :id=>id, :class=>role do; _slim_controls6 = [];
1137
1303
  ; _slim_controls6 << (text);
1138
1304
  ; _slim_controls6 = _slim_controls6.join(""); end; _buf << (_slim_controls5); end; end; _buf = _buf.join("")
1139
1305
  end
1140
1306
  end
1141
1307
 
1142
- def toc(node, opts = {})
1308
+ def inline_break(node, opts = {})
1143
1309
  node.extend(Helpers)
1144
1310
  node.instance_eval do
1145
- _buf = [];
1146
- ;
1147
- ; if document.attr?(:toc) && document.sections?;
1148
- ; toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'));
1149
- ; _buf << ("<nav"); _slim_codeattributes1 = toc_id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = (attr :role, (document.attr 'toc-class', 'toc')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (" role=\"doc-toc\">");
1150
- ; _slim_htag_filter1 = ((level + 2)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes3 = ("#{toc_id}-title" if toc_id); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _buf << (">");
1151
- ; _buf << ((title || (document.attr 'toc-title')));
1152
- ; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">");
1153
- ; _buf << (converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels));
1154
- ; _buf << ("</nav>"); else;
1155
- ; _buf << ("<!--toc disabled-->");
1156
- ; end; _buf = _buf.join("")
1311
+ _buf = []; _buf << (text);
1312
+ ; _buf << ("<br>");
1313
+ ; _buf = _buf.join("")
1157
1314
  end
1158
1315
  end
1159
1316
 
1160
- def inline_indexterm(node, opts = {})
1317
+ def audio(node, opts = {})
1161
1318
  node.extend(Helpers)
1162
1319
  node.instance_eval do
1163
- _buf = []; if type == :visible;
1164
- ; _buf << (text);
1165
- ; end; _buf = _buf.join("")
1320
+ _buf = []; _slim_controls1 = block_with_caption :bottom, :class=>'audio-block' do; _slim_controls2 = [];
1321
+ ;
1322
+ ;
1323
+ ;
1324
+ ;
1325
+ ; _slim_controls2 << ("<audio"); _slim_codeattributes1 = media_uri(attr :target); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_codeattributes2 = (option? 'autoplay'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" autoplay"); else; _slim_controls2 << (" autoplay=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_codeattributes3 = !(option? 'nocontrols'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" controls"); else; _slim_controls2 << (" controls=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_codeattributes4 = (option? 'loop'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" loop"); else; _slim_controls2 << (" loop=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">Your browser does not support the audio tag.</audio>");
1326
+ ;
1327
+ ; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1166
1328
  end
1167
1329
  end
1168
1330
 
1169
- def thematic_break(node, opts = {})
1331
+ def open(node, opts = {})
1170
1332
  node.extend(Helpers)
1171
1333
  node.instance_eval do
1172
- _buf = []; _buf << ("<hr>");
1173
- ; _buf = _buf.join("")
1334
+ _buf = []; if style == 'abstract';
1335
+ ; if abstract_allowed?;
1336
+ ; _slim_controls1 = block_with_title :class=>'quote-block abstract' do; _slim_controls2 = [];
1337
+ ; _slim_controls2 << ("<blockquote>"); _slim_controls2 << (content);
1338
+ ; _slim_controls2 << ("</blockquote>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); end; elsif style != 'partintro' || partintro_allowed?;
1339
+ ; _slim_controls3 = block_with_title :class=>['open-block', (style if style != 'open')] do; _slim_controls4 = [];
1340
+ ; _slim_controls4 << ("<div class=\"content\">"); _slim_controls4 << (content);
1341
+ ; _slim_controls4 << ("</div>"); _slim_controls4 = _slim_controls4.join(""); end; _buf << (_slim_controls3); end; _buf = _buf.join("")
1174
1342
  end
1175
1343
  end
1176
1344
 
1177
- def inline_menu(node, opts = {})
1345
+ def table(node, opts = {})
1178
1346
  node.extend(Helpers)
1179
1347
  node.instance_eval do
1180
- _buf = []; if local_attr :menuitem;
1181
- ; capture do;
1182
- ; _buf << ("&#160;<b class=\"caret\">&#8250;</b>");
1348
+ _buf = []; _slim_controls1 = block_with_caption :top, :class=>'table-block' do; _slim_controls2 = [];
1183
1349
  ;
1184
- ; end; _buf << ("<span class=\"menuseq\"><b class=\"menu\">");
1185
1350
  ;
1186
- ; _buf << ((attr :menu));
1187
- ; yield_capture;
1188
- ; _buf << ("</b>"); (attr 'submenus').each do |submenu|;
1189
- ; _buf << ("<b class=\"submenu\">");
1190
- ; _buf << (submenu);
1191
- ; yield_capture;
1192
- ; _buf << ("</b>"); end; _buf << ("<b class=\"menuitem\">"); _buf << ((local_attr :menuitem));
1193
- ; _buf << ("</b></span>"); else;
1194
- ; _buf << ("<b class=\"menuref\">"); _buf << ((attr :menu));
1195
- ; _buf << ("</b>"); end; _buf = _buf.join("")
1351
+ ; _slim_controls2 << ("<table"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = ["frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", stretch?, ("stripes-#{attr :stripes}" if attr? :stripes)]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = style_value(width: ("#{attr :tablepcwidth}%" if !autowidth? && !stretch? || (local_attr :width)),
1352
+ float: (attr :float)); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" style"); else; _slim_controls2 << (" style=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
1353
+ ; unless (attr :rowcount).zero?;
1354
+ ; _slim_controls2 << ("<colgroup>");
1355
+ ; if autowidth?;
1356
+ ; columns.each do;
1357
+ ; _slim_controls2 << ("<col>");
1358
+ ; end; else;
1359
+ ; columns.each do |col|;
1360
+ ; _slim_controls2 << ("<col"); _slim_codeattributes3 = style_value(width: ("#{col.attr :colpcwidth}%" if !autowidth? col)); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" style"); else; _slim_controls2 << (" style=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
1361
+ ; end; end; _slim_controls2 << ("</colgroup>"); [:head, :foot, :body].reject { |tblsec| rows[tblsec].empty? }.each do |tblsec|;
1362
+ ; _slim_controls2 << ("<t"); _slim_controls2 << (tblsec); _slim_controls2 << (">");
1363
+ ; rows[tblsec].each do |row|;
1364
+ ; _slim_controls2 << ("<tr>");
1365
+ ; row.each do |cell|;
1366
+ ; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
1367
+ :class=>["halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
1368
+ :colspan=>cell.colspan,
1369
+ :rowspan=>cell.rowspan,
1370
+ :style=>style_value(background_color: (document.attr :cellbgcolor))) do; _slim_controls4 = [];
1371
+ ; if tblsec == :head;
1372
+ ; _slim_controls4 << (cell.text);
1373
+ ; else;
1374
+ ; case cell.style;
1375
+ ; when :asciidoc;
1376
+ ; _slim_controls4 << (cell.content);
1377
+ ; when :literal;
1378
+ ; _slim_controls4 << ("<div class=\"literal\"><pre>"); _slim_controls4 << (cell.text);
1379
+ ; _slim_controls4 << ("</pre></div>"); else;
1380
+ ; if (content = cell.content).one?;
1381
+ ; _slim_controls4 << (content.first);
1382
+ ; else;
1383
+ ; content.each do |text|;
1384
+ ; _slim_controls4 << ("<p>"); _slim_controls4 << (text);
1385
+ ; _slim_controls4 << ("</p>"); end; end; end; end; _slim_controls4 = _slim_controls4.join(""); end; _slim_controls2 << (_slim_controls3); end; _slim_controls2 << ("</tr>"); end; _slim_controls2 << ("</t"); _slim_controls2 << (tblsec); _slim_controls2 << (">");
1386
+ ; end; end; _slim_controls2 << ("</table>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1387
+ end
1388
+ end
1389
+
1390
+ def inline_anchor(node, opts = {})
1391
+ node.extend(Helpers)
1392
+ node.instance_eval do
1393
+ _buf = []; case type;
1394
+ ; when :xref;
1395
+ ; _buf << ("<a"); _slim_codeattributes1 = target; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" href"); else; _buf << (" href=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = role; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">"); _buf << (xref_text);
1396
+ ; _buf << ("</a>"); when :ref;
1397
+ ; _buf << ("<a"); _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _buf << (" aria-hidden=\"true\"></a>");
1398
+ ; when :bibref;
1399
+ ; _buf << ("<a"); _slim_codeattributes4 = id; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes4); _buf << ("\""); end; end; _buf << (" aria-hidden=\"true\"></a>");
1400
+ ; _buf << (bibref_text);
1401
+ ; else;
1402
+ ; _buf << ("<a"); _slim_codeattributes5 = id; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes5); _buf << ("\""); end; end; _temple_html_attributeremover2 = []; _slim_codeattributes6 = role; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes6.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes6); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _slim_codeattributes7 = target; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" href"); else; _buf << (" href=\""); _buf << (_slim_codeattributes7); _buf << ("\""); end; end; _slim_codeattributes8 = (attr :window); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" target"); else; _buf << (" target=\""); _buf << (_slim_codeattributes8); _buf << ("\""); end; end; _slim_codeattributes9 = link_rel; if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" rel"); else; _buf << (" rel=\""); _buf << (_slim_codeattributes9); _buf << ("\""); end; end; _slim_codeattributes10 = (attr :title); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" title"); else; _buf << (" title=\""); _buf << (_slim_codeattributes10); _buf << ("\""); end; end; _buf << (">"); _buf << (text);
1403
+ ; _buf << ("</a>"); end; _buf = _buf.join("")
1404
+ end
1405
+ end
1406
+
1407
+ def floating_title(node, opts = {})
1408
+ node.extend(Helpers)
1409
+ node.instance_eval do
1410
+ _buf = []; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = [style, role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">");
1411
+ ; _buf << (title);
1412
+ ; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">"); _buf = _buf.join("")
1413
+ end
1414
+ end
1415
+
1416
+ def sidebar(node, opts = {})
1417
+ node.extend(Helpers)
1418
+ node.instance_eval do
1419
+ _buf = []; _buf << ("<aside"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "sidebar"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1420
+ ; if title?;
1421
+ ; _buf << ("<h6 class=\"block-title\">"); _buf << (title);
1422
+ ; _buf << ("</h6>"); end; _buf << (content);
1423
+ ; _buf << ("</aside>"); _buf = _buf.join("")
1424
+ end
1425
+ end
1426
+
1427
+ def page_break(node, opts = {})
1428
+ node.extend(Helpers)
1429
+ node.instance_eval do
1430
+ _buf = []; _buf << ("<div role=\"doc-pagebreak\" style=\"page-break-after: always;\"></div>");
1431
+ ; _buf = _buf.join("")
1432
+ end
1433
+ end
1434
+
1435
+ def literal(node, opts = {})
1436
+ node.extend(Helpers)
1437
+ node.instance_eval do
1438
+ _buf = []; _slim_controls1 = block_with_title :class=>'literal-block' do; _slim_controls2 = [];
1439
+ ; _slim_controls2 << ("<pre"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = nowrap?; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << (">"); _slim_controls2 << (content);
1440
+ ; _slim_controls2 << ("</pre>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1441
+ end
1442
+ end
1443
+
1444
+ def inline_callout(node, opts = {})
1445
+ node.extend(Helpers)
1446
+ node.instance_eval do
1447
+ _buf = []; _buf << ("<b class=\"conum\">"); _buf << (text);
1448
+ ; _buf << ("</b>"); _buf = _buf.join("")
1196
1449
  end
1197
1450
  end
1198
1451
 
1199
1452
  def embedded(node, opts = {})
1200
1453
  node.extend(Helpers)
1201
1454
  node.instance_eval do
1202
- _buf = []; if !notitle && has_header?;
1455
+ _buf = []; if !notitle && header?;
1203
1456
  ; _buf << ("<h1"); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << (">"); _buf << (header.title);
1204
1457
  ; _buf << ("</h1>"); end; if node.sections? && (attr? :toc) && (attr 'toc-placement', 'auto') == 'auto';
1205
1458
  ; _buf << ("<nav id=\"toc\""); _temple_html_attributeremover1 = []; _slim_codeattributes2 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (" role=\"doc-toc\"><h2 id=\"toc-title\">");
@@ -1225,90 +1478,12 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
1225
1478
  end
1226
1479
  end
1227
1480
 
1228
- def document(node, opts = {})
1481
+ def stem(node, opts = {})
1229
1482
  node.extend(Helpers)
1230
1483
  node.instance_eval do
1231
- _buf = []; _buf << ("<!DOCTYPE html><html");
1232
- ; _slim_codeattributes1 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" lang"); else; _buf << (" lang=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _buf << ("><head><meta");
1233
- ;
1234
- ; _slim_codeattributes2 = (attr :encoding, 'UTF-8'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" charset"); else; _buf << (" charset=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << ("><!--[if IE]><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><![endif]--><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><meta name=\"generator\" content=\"Asciidoctor ");
1235
- ;
1236
- ;
1237
- ;
1238
- ; _buf << (attr 'asciidoctor-version'); _buf << ("\">");
1239
- ; _buf << (html_meta_if 'application-name', (attr 'app-name'));
1240
- ; _buf << (html_meta_if 'author', (attr :authors));
1241
- ; _buf << (html_meta_if 'copyright', (attr :copyright));
1242
- ; _buf << (html_meta_if 'description', (attr :description));
1243
- ; _buf << (html_meta_if 'keywords', (attr :keywords));
1244
- ; _buf << ("<title>"); _buf << (((doctitle sanitize: true) || (attr 'untitled-label')));
1245
- ; _buf << ("</title>"); _buf << (styles_and_scripts);
1246
- ; unless (docinfo_content = docinfo).empty?;
1247
- ; _buf << (docinfo_content);
1248
- ; end; _buf << ("</head><body");
1249
- ;
1250
- ;
1251
- ; _slim_codeattributes3 = id; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes3); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes4 = [(attr :doctype), ("#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}" if (attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto'))]; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes4.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes4); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes5 = style_value(max_width: (attr 'max-width')); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" style"); else; _buf << (" style=\""); _buf << (_slim_codeattributes5); _buf << ("\""); end; end; _buf << (">");
1252
- ; unless noheader;
1253
- ; _buf << ("<header>");
1254
- ; if has_header?;
1255
- ; unless notitle;
1256
- ; _buf << ("<h1>"); _buf << (header.title);
1257
- ; _buf << ("</h1>"); end; if [:author, :revnumber, :revdate, :revremark].any? {|a| attr? a };
1258
- ; _buf << ("<div class=\"details\">");
1259
- ; if attr? :author;
1260
- ; _buf << ("<span class=\"author\" id=\"author\">"); _buf << ((attr :author));
1261
- ; _buf << ("</span><br>");
1262
- ; if attr? :email;
1263
- ; _buf << ("<span class=\"email\" id=\"email\">"); _buf << (sub_macros(attr :email));
1264
- ; _buf << ("</span><br>");
1265
- ; end; if (authorcount = (attr :authorcount).to_i) > 1;
1266
- ; (2..authorcount).each do |idx|;
1267
- ; _buf << ("<span class=\"author\" id=\"author"); _buf << (idx); _buf << ("\">"); _buf << ((attr "author_#{idx}"));
1268
- ; _buf << ("</span><br>");
1269
- ; if attr? "email_#{idx}";
1270
- ; _buf << ("<span class=\"email\" id=\"email"); _buf << (idx); _buf << ("\">"); _buf << (sub_macros(attr "email_#{idx}"));
1271
- ; _buf << ("</span>"); end; end; end; end; if attr? :revnumber;
1272
- ; _buf << ("<span id=\"revnumber\">"); _buf << (((attr 'version-label') || '').downcase); _buf << (" "); _buf << (attr :revnumber); _buf << (',' if attr? :revdate); _buf << ("</span> ");
1273
- ;
1274
- ; end; if attr? :revdate;
1275
- ; _buf << ("<time id=\"revdate\""); _slim_codeattributes6 = revdate_iso; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" datetime"); else; _buf << (" datetime=\""); _buf << (_slim_codeattributes6); _buf << ("\""); end; end; _buf << (">"); _buf << ((attr :revdate));
1276
- ; _buf << ("</time>"); end; if attr? :revremark;
1277
- ; _buf << ("<br><span id=\"revremark\">");
1278
- ; _buf << ((attr :revremark));
1279
- ; _buf << ("</span>"); end; _buf << ("</div>"); end; end; if (attr? :toc) && (attr? 'toc-placement', 'auto');
1280
- ; _buf << ("<nav id=\"toc\""); _temple_html_attributeremover2 = []; _slim_codeattributes7 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes7; _slim_codeattributes7 = _slim_codeattributes7.flatten; _slim_codeattributes7.map!(&:to_s); _slim_codeattributes7.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes7.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes7); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover2); _buf << ("\""); end; _buf << (" role=\"doc-toc\"><h2 id=\"toc-title\">");
1281
- ; _buf << ((document.attr 'toc-title'));
1282
- ; _buf << ("</h2>");
1283
- ; _buf << (converter.convert document, 'outline');
1284
- ; _buf << ("</nav>");
1285
- ; end;
1286
- ; _buf << ("</header>"); end; _buf << ("<div id=\"content\">"); _buf << (content);
1287
- ; _buf << ("</div>"); unless !footnotes? || (attr? :nofootnotes);
1288
- ; _buf << ("<section class=\"footnotes\" aria-label=\"Footnotes\" role=\"doc-endnotes\"><hr><ol class=\"footnotes\">");
1289
- ;
1290
- ;
1291
- ; footnotes.each do |fn|;
1292
- ; _buf << ("<li class=\"footnote\""); _slim_codeattributes8 = (footnote_id fn.index); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes8); _buf << ("\""); end; end; _buf << (" role=\"doc-endnote\">");
1293
- ; _buf << ("#{fn.text} ");
1294
- ;
1295
- ;
1296
- ;
1297
- ; _buf << ("<a class=\"footnote-backref\" href=\"#"); _buf << (footnoteref_id fn.index); _buf << ("\" role=\"doc-backlink\" title=\"Jump to the first occurrence in the text\">&#8617;</a></li>");
1298
- ;
1299
- ; end; _buf << ("</ol></section>");
1300
- ; end; unless nofooter;
1301
- ; _buf << ("<footer><div id=\"footer-text\">");
1302
- ;
1303
- ; if attr? :revnumber;
1304
- ; _buf << (attr 'version-label'); _buf << (" "); _buf << (attr :revnumber);
1305
- ; end; if attr? 'last-update-label';
1306
- ; _buf << ("<br>");
1307
- ; _buf << (attr 'last-update-label'); _buf << (" "); _buf << (attr :docdatetime);
1308
- ; end; _buf << ("</div>"); unless (docinfo_content = (docinfo :footer)).empty?;
1309
- ; _buf << (docinfo_content);
1310
- ; end;
1311
- ; _buf << ("</footer>"); end; _buf << ("</body></html>"); _buf = _buf.join("")
1484
+ _buf = []; _slim_controls1 = block_with_caption :top, :class=>'stem-block' do; _slim_controls2 = [];
1485
+ ; _slim_controls2 << ("<div class=\"math\""); _slim_codeattributes1 = stem_lang; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-lang"); else; _slim_controls2 << (" data-lang=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">"); _slim_controls2 << ((delimit_stem content, style));
1486
+ ; _slim_controls2 << ("</div>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1312
1487
  end
1313
1488
  end
1314
1489
 
@@ -1331,172 +1506,12 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
1331
1506
  ;
1332
1507
  ;
1333
1508
  ;
1334
- ; _slim_controls2 << ("<video"); _slim_codeattributes6 = video_uri; if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes6); _slim_controls2 << ("\""); end; end; _slim_codeattributes7 = (attr :width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width"); else; _slim_controls2 << (" width=\""); _slim_controls2 << (_slim_codeattributes7); _slim_controls2 << ("\""); end; end; _slim_codeattributes8 = (attr :height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height"); else; _slim_controls2 << (" height=\""); _slim_controls2 << (_slim_codeattributes8); _slim_controls2 << ("\""); end; end; _slim_codeattributes9 = (media_uri(attr :poster) if attr? :poster); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" poster"); else; _slim_controls2 << (" poster=\""); _slim_controls2 << (_slim_codeattributes9); _slim_controls2 << ("\""); end; end; _slim_codeattributes10 = (option? 'autoplay'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" autoplay"); else; _slim_controls2 << (" autoplay=\""); _slim_controls2 << (_slim_codeattributes10); _slim_controls2 << ("\""); end; end; _slim_codeattributes11 = !(option? 'nocontrols'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" controls"); else; _slim_controls2 << (" controls=\""); _slim_controls2 << (_slim_codeattributes11); _slim_controls2 << ("\""); end; end; _slim_codeattributes12 = (option? 'loop'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" loop"); else; _slim_controls2 << (" loop=\""); _slim_controls2 << (_slim_codeattributes12); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">Your browser does not support the video tag.</video>");
1335
- ;
1336
- ; end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1337
- end
1338
- end
1339
-
1340
- def ulist(node, opts = {})
1341
- node.extend(Helpers)
1342
- node.instance_eval do
1343
- _buf = []; checklist = 'task-list' if option? 'checklist';
1344
- ; _slim_controls1 = block_with_title :class=>['ulist', style] do; _slim_controls2 = [];
1345
- ; _slim_controls2 << ("<ul"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = (checklist || style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << (">");
1346
- ; items.each do |item|;
1347
- ; if checklist && (item.attr? :checkbox);
1348
- ; _slim_controls2 << ("<li class=\"task-list-item\"><input class=\"task-list-item-checkbox\" type=\"checkbox\" disabled");
1349
- ; _slim_codeattributes2 = (item.attr? :checked); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" checked"); else; _slim_controls2 << (" checked=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_controls2 << ("> ");
1350
- ; _slim_controls2 << (item.text);
1351
- ; _slim_controls2 << ("</li>"); else;
1352
- ; _slim_controls2 << ("<li>");
1353
- ; _slim_controls2 << ((print_item_content item));
1354
- ; _slim_controls2 << ("</li>"); end; end; _slim_controls2 << ("</ul>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1355
- end
1356
- end
1357
-
1358
- def inline_button(node, opts = {})
1359
- node.extend(Helpers)
1360
- node.instance_eval do
1361
- _buf = []; _buf << ("<b class=\"button\">"); _buf << (text);
1362
- ; _buf << ("</b>"); _buf = _buf.join("")
1363
- end
1364
- end
1365
-
1366
- def audio(node, opts = {})
1367
- node.extend(Helpers)
1368
- node.instance_eval do
1369
- _buf = []; _slim_controls1 = block_with_caption :bottom, :class=>'audio-block' do; _slim_controls2 = [];
1370
- ;
1371
- ;
1372
- ;
1373
- ;
1374
- ; _slim_controls2 << ("<audio"); _slim_codeattributes1 = media_uri(attr :target); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes1); _slim_controls2 << ("\""); end; end; _slim_codeattributes2 = (option? 'autoplay'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" autoplay"); else; _slim_controls2 << (" autoplay=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_codeattributes3 = !(option? 'nocontrols'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" controls"); else; _slim_controls2 << (" controls=\""); _slim_controls2 << (_slim_codeattributes3); _slim_controls2 << ("\""); end; end; _slim_codeattributes4 = (option? 'loop'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" loop"); else; _slim_controls2 << (" loop=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">Your browser does not support the audio tag.</audio>");
1375
- ;
1376
- ; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1377
- end
1378
- end
1379
-
1380
- def verse(node, opts = {})
1381
- node.extend(Helpers)
1382
- node.instance_eval do
1383
- _buf = []; _slim_controls1 = block_with_title :class=>'verse-block' do; _slim_controls2 = [];
1384
- ; if attr?(:attribution) || attr?(:citetitle);
1385
- ; _slim_controls2 << ("<blockquote class=\"verse\"><pre class=\"verse\">");
1386
- ; _slim_controls2 << (content);
1387
- ; _slim_controls2 << ("</pre><footer>&#8212; <cite>");
1388
- ;
1389
- ;
1390
- ; _slim_controls2 << ([(attr :attribution), (attr :citetitle)].compact.join(', '));
1391
- ; _slim_controls2 << ("</cite></footer></blockquote>");
1392
- ; else;
1393
- ; _slim_controls2 << ("<pre class=\"verse\">"); _slim_controls2 << (content);
1394
- ; _slim_controls2 << ("</pre>"); end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1395
- end
1396
- end
1397
-
1398
- def sidebar(node, opts = {})
1399
- node.extend(Helpers)
1400
- node.instance_eval do
1401
- _buf = []; _buf << ("<aside"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "sidebar"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1402
- ; if title?;
1403
- ; _buf << ("<h6 class=\"block-title\">"); _buf << (title);
1404
- ; _buf << ("</h6>"); end; _buf << (content);
1405
- ; _buf << ("</aside>"); _buf = _buf.join("")
1406
- end
1407
- end
1408
-
1409
- def literal(node, opts = {})
1410
- node.extend(Helpers)
1411
- node.instance_eval do
1412
- _buf = []; _slim_controls1 = block_with_title :class=>'literal-block' do; _slim_controls2 = [];
1413
- ; _slim_controls2 << ("<pre"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = nowrap?; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_controls2 << (">"); _slim_controls2 << (content);
1414
- ; _slim_controls2 << ("</pre>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1415
- end
1416
- end
1417
-
1418
- def inline_image(node, opts = {})
1419
- node.extend(Helpers)
1420
- node.instance_eval do
1421
- _buf = []; _slim_controls1 = html_tag_if((attr? :link), :a, :class=>'image', :href=>(attr :link), :target=>(attr :window), :rel=>link_rel) do; _slim_controls2 = [];
1422
- ; if type == 'icon' && (document.attr? :icons, 'font');
1423
- ; _slim_controls2 << ("<i"); _temple_html_attributeremover1 = []; _slim_codeattributes1 = [*icon_fa_classes, role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes1.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes1); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover1); _slim_controls2 << ("\""); end; _slim_codeattributes2 = (attr :title); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes2); _slim_controls2 << ("\""); end; end; _slim_controls2 << ("></i>");
1424
- ; elsif type == 'icon' && !(document.attr? :icons);
1425
- ; _slim_controls2 << ("<b"); _temple_html_attributeremover2 = []; _slim_codeattributes3 = ['icon', role]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << (_slim_codeattributes3.join(" ")); else; _temple_html_attributeremover2 << (_slim_codeattributes3); end; _temple_html_attributeremover2 = _temple_html_attributeremover2.join(""); if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover2); _slim_controls2 << ("\""); end; _slim_codeattributes4 = (attr :title); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes4); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">[");
1426
- ; _slim_controls2 << (attr :alt); _slim_controls2 << ("]</b>");
1427
- ; else;
1428
1509
  ;
1510
+ ; _slim_controls2 << ("<video"); _slim_codeattributes6 = video_uri; if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes6); _slim_controls2 << ("\""); end; end; _slim_codeattributes7 = (attr :width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width"); else; _slim_controls2 << (" width=\""); _slim_controls2 << (_slim_codeattributes7); _slim_controls2 << ("\""); end; end; _slim_codeattributes8 = (attr :height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height"); else; _slim_controls2 << (" height=\""); _slim_controls2 << (_slim_codeattributes8); _slim_controls2 << ("\""); end; end; _slim_codeattributes9 = (media_uri(attr :poster) if attr? :poster); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" poster"); else; _slim_controls2 << (" poster=\""); _slim_controls2 << (_slim_codeattributes9); _slim_controls2 << ("\""); end; end; _slim_codeattributes10 = (option? 'autoplay'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" autoplay"); else; _slim_controls2 << (" autoplay=\""); _slim_controls2 << (_slim_codeattributes10); _slim_controls2 << ("\""); end; end; _slim_codeattributes11 = (option? 'muted'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" muted"); else; _slim_controls2 << (" muted=\""); _slim_controls2 << (_slim_codeattributes11); _slim_controls2 << ("\""); end; end; _slim_codeattributes12 = !(option? 'nocontrols'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" controls"); else; _slim_controls2 << (" controls=\""); _slim_controls2 << (_slim_codeattributes12); _slim_controls2 << ("\""); end; end; _slim_codeattributes13 = (option? 'loop'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" loop"); else; _slim_controls2 << (" loop=\""); _slim_controls2 << (_slim_codeattributes13); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">Your browser does not support the video tag.</video>");
1429
1511
  ;
1430
- ; _slim_controls2 << ("<img"); _slim_codeattributes5 = (type == 'icon' ? (icon_uri target) : (image_uri target)); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" src"); else; _slim_controls2 << (" src=\""); _slim_controls2 << (_slim_codeattributes5); _slim_controls2 << ("\""); end; end; _slim_codeattributes6 = (attr :alt); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" alt"); else; _slim_controls2 << (" alt=\""); _slim_controls2 << (_slim_codeattributes6); _slim_controls2 << ("\""); end; end; _slim_codeattributes7 = (attr :width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width"); else; _slim_controls2 << (" width=\""); _slim_controls2 << (_slim_codeattributes7); _slim_controls2 << ("\""); end; end; _slim_codeattributes8 = (attr :height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height"); else; _slim_controls2 << (" height=\""); _slim_controls2 << (_slim_codeattributes8); _slim_controls2 << ("\""); end; end; _slim_codeattributes9 = (attr :title); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" title"); else; _slim_controls2 << (" title=\""); _slim_controls2 << (_slim_codeattributes9); _slim_controls2 << ("\""); end; end; _slim_codeattributes10 = (attr :loading); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" loading"); else; _slim_controls2 << (" loading=\""); _slim_controls2 << (_slim_codeattributes10); _slim_controls2 << ("\""); end; end; _temple_html_attributeremover3 = []; _slim_codeattributes11 = [(type if type != 'image'), role]; if Array === _slim_codeattributes11; _slim_codeattributes11 = _slim_codeattributes11.flatten; _slim_codeattributes11.map!(&:to_s); _slim_codeattributes11.reject!(&:empty?); _temple_html_attributeremover3 << (_slim_codeattributes11.join(" ")); else; _temple_html_attributeremover3 << (_slim_codeattributes11); end; _temple_html_attributeremover3 = _temple_html_attributeremover3.join(""); if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\""); _slim_controls2 << (_temple_html_attributeremover3); _slim_controls2 << ("\""); end; _slim_codeattributes12 = style_value(float: (attr :float)); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" style"); else; _slim_controls2 << (" style=\""); _slim_controls2 << (_slim_codeattributes12); _slim_controls2 << ("\""); end; end; _slim_controls2 << (">");
1431
1512
  ; end; _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1432
1513
  end
1433
1514
  end
1434
-
1435
- def outline(node, opts = {})
1436
- node.extend(Helpers)
1437
- node.instance_eval do
1438
- _buf = []; unless sections.empty?;
1439
- ;
1440
- ; toclevels ||= opts[:toclevels] || (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
1441
- ; slevel = section_level sections.first;
1442
- ; _buf << ("<ol class=\"toc-list level-"); _buf << (slevel); _buf << ("\">");
1443
- ; sections.each do |sec|;
1444
- ; _buf << ("<li><a href=\"#");
1445
- ; _buf << (sec.id); _buf << ("\">"); _buf << (section_title sec);
1446
- ; _buf << ("</a>"); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
1447
- ; _buf << (child_toc);
1448
- ; end; _buf << ("</li>"); end; _buf << ("</ol>"); end; _buf = _buf.join("")
1449
- end
1450
- end
1451
-
1452
- def example(node, opts = {})
1453
- node.extend(Helpers)
1454
- node.instance_eval do
1455
- _buf = []; _slim_controls1 = block_with_caption :top, :class=>'example-block' do; _slim_controls2 = [];
1456
- ; _slim_controls2 << ("<div class=\"example\">");
1457
- ; _slim_controls2 << (content);
1458
- ; _slim_controls2 << ("</div>"); _slim_controls2 = _slim_controls2.join(""); end; _buf << (_slim_controls1); _buf = _buf.join("")
1459
- end
1460
- end
1461
-
1462
- def colist(node, opts = {})
1463
- node.extend(Helpers)
1464
- node.instance_eval do
1465
- _buf = [];
1466
- ; _buf << ("<ol"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "callout-list"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = [style, role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1467
- ; items.each do |item|;
1468
- ; _buf << ("<li>"); _buf << (item.text);
1469
- ; _buf << ("</li>"); end; _buf << ("</ol>"); _buf = _buf.join("")
1470
- end
1471
- end
1472
-
1473
- def section(node, opts = {})
1474
- node.extend(Helpers)
1475
- node.instance_eval do
1476
- _buf = []; _buf << ("<section"); _temple_html_attributeremover1 = []; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "doc-section"; _temple_html_attributemerger1[1] = []; _slim_codeattributes1 = ["level-#{section_level}", role]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << (_slim_codeattributes1.join(" ")); else; _temple_html_attributemerger1[1] << (_slim_codeattributes1); end; _temple_html_attributemerger1[1] = _temple_html_attributemerger1[1].join(""); _temple_html_attributeremover1 << (_temple_html_attributemerger1.reject(&:empty?).join(" ")); _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">");
1477
- ; _slim_htag_filter1 = ((section_level + 1)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes2 = id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes2); _buf << ("\""); end; end; _buf << (">");
1478
- ; if id;
1479
- ; if document.attr? :sectanchors;
1480
- ; _buf << ("<a class=\"anchor\" href=\"#"); _buf << (id); _buf << ("\" aria-hidden=\"true\"></a>");
1481
- ; end; if document.attr? :sectlinks;
1482
- ; _buf << ("<a class=\"link\" href=\"#"); _buf << (id); _buf << ("\">"); _buf << (section_title);
1483
- ; _buf << ("</a>"); else;
1484
- ; _buf << (section_title);
1485
- ; end; else;
1486
- ; _buf << (section_title);
1487
- ; end; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">"); _buf << (content);
1488
- ; _buf << ("</section>"); _buf = _buf.join("")
1489
- end
1490
- end
1491
-
1492
- def floating_title(node, opts = {})
1493
- node.extend(Helpers)
1494
- node.instance_eval do
1495
- _buf = []; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h"); _buf << (_slim_htag_filter1); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id"); else; _buf << (" id=\""); _buf << (_slim_codeattributes1); _buf << ("\""); end; end; _temple_html_attributeremover1 = []; _slim_codeattributes2 = [style, role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << (_slim_codeattributes2.join(" ")); else; _temple_html_attributeremover1 << (_slim_codeattributes2); end; _temple_html_attributeremover1 = _temple_html_attributeremover1.join(""); if !_temple_html_attributeremover1.empty?; _buf << (" class=\""); _buf << (_temple_html_attributeremover1); _buf << ("\""); end; _buf << (">");
1496
- ; _buf << (title);
1497
- ; _buf << ("</h"); _buf << (_slim_htag_filter1); _buf << (">"); _buf = _buf.join("")
1498
- end
1499
- end
1500
1515
  #------------------ End of generated transformation methods ------------------#
1501
1516
 
1502
1517