File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1011,6 +1011,16 @@ do_html() {
1011
1011
local crossref=$3
1012
1012
mkdir -p " $( dirname ${output} ) "
1013
1013
echo " Generating HTML Output"
1014
+
1015
+ local processed_input=" processed.input"
1016
+ cp " ${input} " ${processed_input}
1017
+
1018
+ # Configure lofItemTemplate/lotItemTemplate in the YAML frontmatter.
1019
+ # These are placed first in the frontmatter so they won't override any existing settings.
1020
+ # These can't be passed as --metadata since the dollar signs won't expand properly.
1021
+ sed -i ' 0,/^---$/{s/---/---\nlofItemTemplate: |\n 1. \$\$lt\$\$/}' ${processed_input}
1022
+ sed -i ' 0,/^---$/{s/---/---\nlotItemTemplate: |\n 1. \$\$lt\$\$/}' ${processed_input}
1023
+
1014
1024
local cmd=(pandoc
1015
1025
--toc
1016
1026
-V colorlinks=true
@@ -1050,7 +1060,7 @@ do_html() {
1050
1060
${EXTRA_PANDOC_OPTIONS}
1051
1061
--to=html
1052
1062
--output=" '${output} '"
1053
- " '${input } '" )
1063
+ " '${processed_input } '" )
1054
1064
retry 5 " ${cmd[@]} "
1055
1065
if [ $? -ne 0 ]; then
1056
1066
FAILED=true
You can’t perform that action at this time.
0 commit comments