#!/bin/bash # Path to directory where this script is # https://stackoverflow.com/a/246128/98600 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # Render txt2tags into html file # Arguments: # 1. txt2tags source file, e.g. download/index.t2t # 2. html target file, e.g. download/index.html function render_t2t_html { t2t="$1" html="$2" tmp="$2.tmp" relroot="$( dirname $t2t | sed -E 's/^.\///' | sed -E 's/[^/]+/../g' )" # First render with txt2tags to handle pre/post processing txt2tags \ --target=html \ --no-headers \ --quiet \ --outfile="$tmp" \ --infile="$t2t" # Replace with
so that Pandoc retains it sed -i.bak "s/<\/A>/