commit d5920ee99ded18c95453e0cb90de9d699334d3b2
parent edd2be4c1b0d48dfafb13e69ff642f0e53061ce9
Author: Riaz <riaz@riazj.com>
Date: Thu, 24 Jul 2025 07:22:04 -0700
tidy: Preserve tabs
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.local/bin/new-article b/.local/bin/new-article
@@ -6,7 +6,7 @@ error() {
cd ~/repos/riazj.com/articles
-gitstat="$(git status -s .)"
+gitstat="$(git status -s . | grep "^??")"
[ -z "$gitstat" ] && error "no new articles"
article="${gitstat#* }"
@@ -16,7 +16,7 @@ article="${gitstat#* }"
grep -q '<meta name="description" content="">' "$article" &&
error "no article description"
-tidy -mq -wrap --tidy-mark no "$article"
+tidy -mq -wrap --keep-tabs yes --tidy-mark no "$article"
title="$(grep -im1 "<title>" "$article")"
title="${title#*>}"; title="${title% |*}"