From 730d0409c6e151a0564f117bf041fcfaef19d858 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 16 Oct 2023 21:19:15 +0300 Subject: [Svg-height-attrib] Updated logic to work only on SVGs that aren't alone in a line Sane explanation of compilers has been kinda broken for a long long time, since it uses SVGs as normal images --- awk-edits/Svg-height-attrib.awk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/awk-edits/Svg-height-attrib.awk b/awk-edits/Svg-height-attrib.awk index fe3027a..e6dc07f 100644 --- a/awk-edits/Svg-height-attrib.awk +++ b/awk-edits/Svg-height-attrib.awk @@ -1,10 +1,12 @@ # # == About # -# This script forces all images with SVG source to have a hard-coded height to them. +# This script forces all images with SVG source, which aren't alone, to have +# a hard-coded height to them. The idea is to not make SVGs inside text take +# up the whole screen. # This is mostly done for browsers that do not support CSS. -/src="[^"]*\.svg"/ { +/

.+]*>.+<\/p>/ { result = "" while(match($0, /src="[^"]*\.svg"/)) { result = result substr($0, 1, RSTART + RLENGTH - 1) " height=18"; -- cgit v1.3.1-23-gd82d