Skip to content

Commit

Permalink
Replace data-src with src="..." in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
m5o authored and XhmikosR committed Nov 11, 2018
1 parent e6a356a commit 57c7cdb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion site/_includes/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@

{%- 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 -%}

0 comments on commit 57c7cdb

Please sign in to comment.