diff --git a/msgfmt b/msgfmt index 3ee5563..8579a0c 100755 --- a/msgfmt +++ b/msgfmt @@ -57,7 +57,7 @@ done refopar="${opar:+${opar%>} id="ref-\\1" class="ref">}" # format the commit message, stopping at the diff (if any) -awk -vid="$id" -vurl_root="$url_root" -vcref_errlog="$cref_errlog" ' +awk -vid="$id" -vurl_root="${url_root%/}" -vcref_errlog="$cref_errlog" ' # replace commit refs with generated URL (allows linking to prior commits # without hard-coding the configurable links that could change or be # relative to where the content is hosted); this will then be processed as a @@ -76,7 +76,7 @@ awk -vid="$id" -vurl_root="$url_root" -vcref_errlog="$cref_errlog" ' printf id"\n" >>cref_errlog } - gsub(/\[cref:.*?\]/, url_root result) + gsub(/\[cref:.*?\]/, (url_root "/" result)) } # stop printing at diff