]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Replace `data-src` with `src="..."` in docs. (#27649)
authorXhmikosR <xhmikosr@gmail.com>
Sun, 11 Nov 2018 12:45:48 +0000 (14:45 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Nov 2018 12:45:48 +0000 (14:45 +0200)
site/_includes/example.html

index 24d12626b66a1b46ceb6c22ab4d5209c3b8cabe7..63621c64b723d0d0a0055bf6698cd62e1ba29097 100644 (file)
@@ -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 -%}