summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-member.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/build-member.sh b/build-member.sh
index ed74909..49a9205 100755
--- a/build-member.sh
+++ b/build-member.sh
@@ -25,6 +25,11 @@ transforms=("\$(transform-li-dropdown-current-a quatuor)"
EOF
}
+pandoc-inline ()
+{
+ pandoc | sed -r 's,^<p>(.+)</p>$,\1,'
+}
+
generate-main ()
{
read fullname
@@ -44,15 +49,16 @@ EOF
while read line
do
- if ! [[ ${line} =~ ([^:?]+[:?] )(.+) ]]
+ # Pasting from GDoc yields trailing spaces; remove those.
+ if ! [[ ${line} =~ ([^:?]+[:?])\ (.+[^ ])\ * ]]
then
>&2 echo "Invalid line: ${line}"
fi
cat <<EOF
<dl>
- <dt>${BASH_REMATCH[1]}</dt>
- <dd>${BASH_REMATCH[2]}</dd>
+ <dt>$(pandoc-inline <<< "${BASH_REMATCH[1]}") </dt>
+ <dd>$(pandoc-inline <<< ${BASH_REMATCH[2]})</dd>
</dl>
EOF
done