diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2018-12-06 10:18:31 +0100 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2018-12-06 10:18:31 +0100 |
| commit | 7bd086ba1925ba96533d4d021527621c2f8f8c83 (patch) | |
| tree | d34485b7e914833c6322ce04036e60df7a0e7aeb /bin/update_html | |
| parent | ff0fe0a6c593219478bb7ef6e071ef17da587be4 (diff) | |
Case-insensitve sed replacements handled the dumb way
Because BSD sed != GNU sed
Diffstat (limited to 'bin/update_html')
| -rwxr-xr-x | bin/update_html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/update_html b/bin/update_html index c71c2e8ef..8e96139ca 100755 --- a/bin/update_html +++ b/bin/update_html @@ -23,7 +23,10 @@ function render_t2t_html { --infile="$t2t" # Replace <A NAME="toc3"></A> with <div id="toc3"></div> so that Pandoc retains it - sed -i.bak "s/<(a|A) (name|NAME)=\"\(.*\)\"><\/(a|A)>/<div id=\"\1\"><\/div>/" "$tmp" && rm "$tmp.bak" + # Do this for both cases since BSD sed doesn't support /i + sed -i.bak "s/<a name=\"\(.*\)\"><\/a>/<div id=\"\1\"><\/div>/" "$tmp" + sed -i.bak "s/<A NAME=\"\(.*\)\"><\/A>/<div id=\"\1\"><\/div>/" "$tmp" + rm -f "$tmp.bak" # Capture first 3 lines of t2t file: title, author, date # Documentation here: https://txt2tags.org/userguide/headerarea |
