mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-10 00:44:52 -06:00
build: Update to marsh 0.2.2.
Fixes an issue where similarly named documents could both be marked selected in advanced navigation.
This commit is contained in:
parent
1638685151
commit
3062b664d7
7
marsh
7
marsh
@ -6,7 +6,7 @@
|
|||||||
# https://github.com/bradleysepos/marsh
|
# https://github.com/bradleysepos/marsh
|
||||||
|
|
||||||
NAME="marsh"
|
NAME="marsh"
|
||||||
VERSION="0.2.1"
|
VERSION="0.2.2"
|
||||||
SELF="${BASH_SOURCE[0]}"
|
SELF="${BASH_SOURCE[0]}"
|
||||||
SELF_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)
|
SELF_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)
|
||||||
SELF_DIR="${SELF_DIR:-$(pwd)}"
|
SELF_DIR="${SELF_DIR:-$(pwd)}"
|
||||||
@ -1505,8 +1505,9 @@ function build_template { # build_template dest_dir target_dir document templat
|
|||||||
NAV_RELPATH="${NAV_RELPATH%/}" # drop trailing slash
|
NAV_RELPATH="${NAV_RELPATH%/}" # drop trailing slash
|
||||||
<"${DEST_DIR}/${TARGET_DIR}/${NAV}" sed -E \
|
<"${DEST_DIR}/${TARGET_DIR}/${NAV}" sed -E \
|
||||||
-e 's|<h1>([^<]+)</h1>|<h1><a href="'"${NAV_RELPATH}/${NAV_NAME}"'">\1</a></h1>|' \
|
-e 's|<h1>([^<]+)</h1>|<h1><a href="'"${NAV_RELPATH}/${NAV_NAME}"'">\1</a></h1>|' \
|
||||||
-e 's|(<a href=")([^.])|\1'"${NAV_RELPATH}/"'\2|g' \
|
-e 's|(<a href=")([^.])|\1'"${NAV_RELPATH}/"'\2|g' | \
|
||||||
-e 's|<a (href="[^"]*'"${DEST_NAME}.html"'"[^>]*)>([^<>]+)</a>|<a \1 class="selected">\2</a>|g' \
|
sed -E \
|
||||||
|
-e 's|<a (href="[^"]*'"${NAV_RELPATH}/${DEST_NAME}.html"'"[^>]*)>([^<>]+)</a>|<a \1 class="selected">\2</a>|g' \
|
||||||
> "${DEST}.${MARSH_UID}.temp"
|
> "${DEST}.${MARSH_UID}.temp"
|
||||||
SUB=$(<"${DEST}.${MARSH_UID}.temp" sed -e ':a' -e '$!{N' -e 'ba' -e '}' -e 's/[&/\]/\\&/g' -e 's/\n/\\&/g')
|
SUB=$(<"${DEST}.${MARSH_UID}.temp" sed -e ':a' -e '$!{N' -e 'ba' -e '}' -e 's/[&/\]/\\&/g' -e 's/\n/\\&/g')
|
||||||
SUB=${SUB%$'\n'}
|
SUB=${SUB%$'\n'}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user