diff --git a/site/_includes/example.html b/site/_includes/example.html index 63621c64b7..308d2850b2 100644 --- a/site/_includes/example.html +++ b/site/_includes/example.html @@ -18,15 +18,32 @@ optional: hide_markup - disabled (default) {%- if include.hide_markup == null -%} {%- highlight html -%} - {%- if include.content contains 'data-src="holder.js' -%} + {%- if include.content contains '', '✂️' | split: '✂️' -%} + {%- if include.content contains 'bd-placeholder-img ' -%} + {%- assign image_class = include.content + | replace_first: 'bd-placeholder-img', 'bd-placeholder-img ✂️' + | replace: '" width="', '✂️" width="' + | split: '✂️' -%} + {%- assign image_class = image_class[1] | replace: 'bd-placeholder-img-lg', '' | strip -%} + {%- endif -%} + + {%- assign image_alt = include.content + | replace: '', '<title>✂️' + | replace: '', '✂️' + | split: '✂️' -%} + {%- assign image_alt = image_alt[1] -%} + {%- for content_chunk in modified_content -%} - {%- if content_chunk contains 'holder.js' -%} - {{- "..." -}} + {%- if content_chunk contains ' + {%- endcapture -%} + {{- img_placeholder -}} {%- else -%} {{- content_chunk -}} {%- endif -%}