From 7f604771f10c1e48c94bb0a09bacf9642d9774b6 Mon Sep 17 00:00:00 2001 From: Spirit Date: Tue, 27 Aug 2024 19:03:59 +0300 Subject: [PATCH] rm unecessary comments --- html-minify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-minify.sh b/html-minify.sh index 40a5ba2..d948b01 100755 --- a/html-minify.sh +++ b/html-minify.sh @@ -1,7 +1,7 @@ #!/bin/bash # Known issues: -# - if html line have two paths only one file considered +# - it graps only one file path from each HTML line and removes other paths in the same line # - fails if js file has backticks command -v html-minifier >/dev/null 2>&1 || { echo "Error: to install missing deps run: npm i -g html-minifier uglify-js clean-css-cli svgo" >&2; exit 1; } @@ -36,7 +36,7 @@ if [[ -f "$html_file" ]]; then } } ' "$html_file" > "${html_file}.tmp" - # Minify and replace content + while IFS= read -r line; do if [[ $line =~ ´([^\"]+)´ ]]; then file="${BASH_REMATCH[1]}"