mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-10 00:44:52 -06:00
build: Update to marsh 0.8.2.
This commit is contained in:
parent
34d268a11b
commit
cbe36ea885
16
marsh
16
marsh
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
# marsh - build static websites using markdown and bash
|
||||
#
|
||||
# Copyright 2021 Bradley Sepos
|
||||
# Copyright 2022 Bradley Sepos
|
||||
# Released under the MIT License. See LICENSE for details.
|
||||
# https://github.com/bradleysepos/marsh
|
||||
|
||||
NAME="marsh"
|
||||
VERSION="0.8.1"
|
||||
VERSION="0.8.2"
|
||||
SELF="${BASH_SOURCE[0]}"
|
||||
SELF_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)
|
||||
SELF_DIR="${SELF_DIR:-$(pwd)}"
|
||||
@ -1724,7 +1724,7 @@ function build_document { # build_document dest_dir target_dir document advance
|
||||
# process images with multiple resolution assets
|
||||
cp "${DOCUMENT}.${MARSH_UID}.document" "${DOCUMENT}.${MARSH_UID}.document.temp"
|
||||
<"${DOCUMENT}.${MARSH_UID}.document.temp" sed -E \
|
||||
-e 's|^!\[(.+)]\([ ]*([^ ]+)[ ]*"(.+)"[ ]*\)$|<figure><a href="\2"><img src="\2" alt="\1" /></a><figcaption>\3</figcaption></figure>|' |
|
||||
-e 's|^!\[(.+)]\([ ]*([^ ]+)[ ]*"(.+)"[ ]*\)$|<figure>\n<a href="\2">\n<img src="\2" alt="\1" />\n</a>\n<figcaption>\3</figcaption>\n</figure>|' |
|
||||
process_markdown |
|
||||
sed -E \
|
||||
-e 's|<p><figure>|<figure>|' \
|
||||
@ -1758,11 +1758,15 @@ function build_document { # build_document dest_dir target_dir document advance
|
||||
} else {
|
||||
f3="";
|
||||
}
|
||||
print "src=\"" f "\" srcset=\"" f1 f2 f3 "\" ";
|
||||
} else {
|
||||
print a[i];
|
||||
a[i] = "src=\"" f "\" srcset=\"" f1 f2 f3 "\"";
|
||||
}
|
||||
if (i > 1)
|
||||
{
|
||||
printf " ";
|
||||
}
|
||||
printf "%s", a[i];
|
||||
}
|
||||
printf "\n";
|
||||
} else {
|
||||
print $0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user