Ensuring url_root will always contain forward slash when concatenated with cref
Trailing slash, if any, is stripped and explicitly added.tpl
parent
f04c9f24a8
commit
3ef6714551
4
msgfmt
4
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
|
||||
|
|
Loading…
Reference in New Issue