X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=macros%2Frevisions;h=9a5730f4021d5a069a748b8e7265658bef8cf433;hb=68261c373aa3e692cff9988f9d021aa0fa1783b6;hp=c6fb8fa2cb59b7d239b81f372515a5ed96ed3a55;hpb=a6ae272ce0af6b93cabddf4aa4a3cebc7350f5a0;p=shellwiki
diff --git a/macros/revisions b/macros/revisions
index c6fb8fa..9a5730f 100755
--- a/macros/revisions
+++ b/macros/revisions
@@ -13,14 +13,15 @@ elif [ ! "$(which git)" ]; then
printf '
GIT is not available to handle revisioning.
'
fi
-printf ''
+printf '\n'
IFS=" "
- git -C "$_DATA" log --date=format:"%a, %x %H:%M" \
- --pretty=format:"%h %cd %s%n" \
- -- "pages${page_abs}#page.md" \
- | while read hash date message; do
+ { git -C "$_DATA" log --date=format:"%a, %x %H:%M" \
+ --pretty=format:"%h %cd %s" \
+ -- "pages${page_abs}#page.md"
+ printf '\n'
+ } | while read -r hash date message; do
user="${message% @*}"; user="${user##*@ }"
- printf '%s%s%s' \
- "$(HTML "${page%/}/[revisions]/$hash")" "$(HTML "$hash")" "$(HTML "$date")" "$(HTML "$user")"
+ printf '- %s%s%s
\n' \
+ "$(HTML "${page%/}/[revision]/$hash")" "$(HTML "$hash")" "$(HTML "$date")" "$(HTML "$user")"
done
-printf '
'
+printf '
\n'