File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44{%- assign image_parts = rendered_content | split: "< img " -%}
55{%- for image_part in image_parts offset: 1 -%}
6+ {%- assign image_tag = image_part | split: "> " | first -%}
67 {%- assign candidate = "" -%}
7- {%- if image_part contains 'src="' -%}
8- {%- assign candidate = image_part | split: 'src="' | last | split: '"' | first | strip -%}
9- {%- elsif image_part contains "src='" -%}
10- {%- assign candidate = image_part | split: "src='" | last | split: "'" | first | strip -%}
8+ {%- if image_tag contains 'src="' -%}
9+ {%- assign candidate = image_tag | split: 'src="' | last | split: '"' | first | strip -%}
10+ {%- elsif image_tag contains "src='" -%}
11+ {%- assign candidate = image_tag | split: "src='" | last | split: "'" | first | strip -%}
1112 {%- endif -%}
1213
1314 {%- assign candidate_downcase = candidate | downcase -%}
You can’t perform that action at this time.
0 commit comments