From 01039b7fd7d096fba159a27b4fe342224c9ea733 Mon Sep 17 00:00:00 2001 From: reuixiy Date: Thu, 9 Jan 2020 03:37:22 +0800 Subject: [PATCH] fix: regex of content.html --- layouts/partials/components/content.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/components/content.html b/layouts/partials/components/content.html index f9e4862b..d79d8117 100644 --- a/layouts/partials/components/content.html +++ b/layouts/partials/components/content.html @@ -122,7 +122,7 @@ {{- $Content := .Scratch.Get "Content" -}} -{{- $regexPatternVideo := `()` -}} +{{- $regexPatternVideo := `(]+)?( />|>)` -}} {{- $regexReplacementVideo := `` -}} {{- $Content := $Content | replaceRE $regexPatternVideo $regexReplacementVideo | safeHTML -}} {{- .Scratch.Set "Content" $Content -}} @@ -198,7 +198,7 @@ {{- $Content := .Scratch.Get "Content" -}} {{- if .Site.Params.enableMediumZoom -}} - {{- $regexPatternMediumZoom := `()` -}} + {{- $regexPatternMediumZoom := `(]+)( />|>)` -}} {{- $regexReplacementMediumZoom := `$1$2 data-zoomable$3` -}} {{- $Content := $Content | replaceRE $regexPatternMediumZoom $regexReplacementMediumZoom | safeHTML -}} {{- .Scratch.Set "Content" $Content -}}