Sha256: 82eb1c8a0af7be2b23cc424c00bd5dd6d3a82730a8765cfa21fdcd656e9eb259
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
{%- assign blocks = content | split: "<pre" -%} {%- for block in blocks -%} {%- assign child_blocks = block | split: "</pre>" %} {%- if child_blocks.size == 1 -%} {{ block }} {%- else -%} {%- comment %} admonitions card {% endcomment -%} {%- assign admonitions = "note, tip, warning, danger" | split: ", " -%} {%- comment %} get pre code and type {% endcomment -%} {%- assign pre_blocks = child_blocks.first | replace_first: ">", "```<temp>```" | split: "```<temp>```" -%} {%- assign pre_type = pre_blocks.first | replace: '"', '' | replace: " class=language-", "" -%} {%- if admonitions contains pre_type -%} <div class="admonition {{ pre_type }}"> {%- comment %} title will be translated via ui {% endcomment -%} <p class="admonition-title" ui="{{ pre_type }}"><span class="progress"></span></p>{{ pre_blocks.last | markdownify | strip_newlines -}} </div>{{ child_blocks.last -}} {%- elsif pre_type == "mermaid" -%} <div class="mermaid">{{ pre_blocks.last }}</div>{{ child_blocks.last }} {%- else -%} <pre{{ child_blocks.first }}</pre> {{ child_blocks.last -}} {%- endif -%} {%- endif -%} {%- endfor -%}
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jekyll-rtd-theme-1.1.4 | _layouts/plugins/extension.liquid |
jekyll-rtd-theme-1.1.3 | _layouts/plugins/extension.liquid |