diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2018-12-05 16:11:33 +0100 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2018-12-05 16:11:33 +0100 |
| commit | b73f033b08113bf4c98beb1a4062a1aa9de5026a (patch) | |
| tree | e8fc8cdc13d18bf88b7864046bc51d18cdb2b301 /bin/update_html | |
| parent | b974c099511a90d41dd234e3bbeccdcc57b38606 (diff) | |
Rewrite <a name=...> to <div id=...> to preserve page anchors in Pandoc
Diffstat (limited to 'bin/update_html')
| -rwxr-xr-x | bin/update_html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/update_html b/bin/update_html index bb0ce3ad4..2d2ac4dc0 100755 --- a/bin/update_html +++ b/bin/update_html @@ -22,6 +22,9 @@ function render_t2t_html { --outfile="$tmp" \ --infile="$t2t" + # Replace <A NAME="toc3"></A> with <div id="toc3"></div> so that Pandoc retains it + sed -i.bak "s/<A NAME=\"\(.*\)\"><\/A>/<div id=\"\1\"><\/div>/" "$tmp" && rm "$tmp.bak" + # Capture first 3 lines of t2t file: title, author, date # Documentation here: https://txt2tags.org/userguide/headerarea l1=$(head -n 1 "$t2t") |
