Concatenate all lua filters into 1 file, then provide that file to 'pandoc'

master
Aadhavan Srinivasan 1 week ago
parent 628a03b2da
commit 5e48d58561

@ -184,8 +184,10 @@ convert_file() {
path_for_output="${BASE_PATH}/output/${path_for_output}"
path_for_output="$(dirname $path_for_output)/$(basename $path_for_output .md).html"
# Get the combined contents of all lua filters
all_lua_filters="$(cat $BASE_PATH/pandoc_filters/*.lua)"
# Convert the file (using the given filters), and place the output in the correct location.
pandoc --lua-filter "$BASE_PATH"/pandoc_filters/* -f markdown --wrap=preserve "$BASE_PATH/temp/$parent_dir/$(basename "$file_to_conv")" > "${path_for_output}"
pandoc --lua-filter <(echo "$all_lua_filters") -f markdown --wrap=preserve "$BASE_PATH/temp/$parent_dir/$(basename "$file_to_conv")" > "${path_for_output}"
convert_to_array "$metadata" #Sets the 'meta_array' array

Loading…
Cancel
Save