From 948356d7d632feae1e694e0a6ce20f7e975c7e50 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 5 Jan 2022 00:53:16 +0800 Subject: [PATCH] Fix `` HTML element refactoring issue (resolve #476, close #477) --- _includes/refactor-content.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_includes/refactor-content.html b/_includes/refactor-content.html index b47e0a9..8f8b042 100644 --- a/_includes/refactor-content.html +++ b/_includes/refactor-content.html @@ -56,9 +56,10 @@ {% assign _height = nil %} {% assign _src = nil %} - {% assign _left = _img_snippet | split: '/>' | first %} - {% assign _right = _img_snippet | replace: _left, '' %} + {% assign _left = _img_snippet | split: '>' | first %} + {% assign _right = _img_snippet | remove: _left %} + {% assign _left = _left | remove: ' /' %} {% assign _left = _left | replace: ' w=', ' width=' | replace: ' h=', ' height=' %} {% assign _attrs = _left | split: ' ' %}