From: XhmikosR Date: Sun, 11 Nov 2018 12:45:48 +0000 (+0200) Subject: Replace `data-src` with `src="..."` in docs. (#27649) X-Git-Tag: v4.2.0~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=110c7f4cc0c5693583e0e69bdde3465c934b6e58;p=thirdparty%2Fbootstrap.git Replace `data-src` with `src="..."` in docs. (#27649) --- diff --git a/site/_includes/example.html b/site/_includes/example.html index 24d12626b6..63621c64b7 100644 --- a/site/_includes/example.html +++ b/site/_includes/example.html @@ -18,6 +18,21 @@ optional: hide_markup - disabled (default) {%- if include.hide_markup == null -%} {%- highlight html -%} - {{- include.content | replace: 'data-src="holder.js', 'src="...' -}} + {%- if include.content contains 'data-src="holder.js' -%} + {%- assign modified_content = include.content + | replace: 'data-src="holder.js', 'src="✂️holder.js' + | replace: '" ', '✂️" ' + | split: '✂️' -%} + + {%- for content_chunk in modified_content -%} + {%- if content_chunk contains 'holder.js' -%} + {{- "..." -}} + {%- else -%} + {{- content_chunk -}} + {%- endif -%} + {%- endfor -%} + {%- else -%} + {{- include.content -}} + {%- endif -%} {%- endhighlight -%} {%- endif -%}