{%- include common/rest/i18n.liquid -%} {%- assign shortcodes = "mermaid, warning, note, tip, danger" | split: ", " -%} {%- if site.debug.shortcodes == false -%} {{ content }} {%- else -%} {%- if content contains "" -%} {%- assign pre_blocks = content_block | split: "" -%} {%- if content_block contains '> {% endcomment -%} {%- assign custom = content_block | replace_first: '>', "" | split: "" -%} {%- assign lang = custom.first -%} {%- assign codes = custom.last | split: "" | first -%} {%- if shortcodes contains lang -%} {%- include shortcodes/{{ lang }}.liquid -%} {{- pre_blocks.last -}} {%- else -%} {{ pre_blocks.last }} {%- endif -%} {%- else -%} {{ pre_blocks.last -}} {%- endif -%} {%- else -%} {{- content_block -}} {%- endif -%} {%- endfor -%} {%- else -%} {{- content -}} {%- endif -%} {%- endif -%}