paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 10f34986cecb639b7e39af3945b1508829bb2c70
parent b7cf0bba38883433f7516b22990db6ebc9f5fc59
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sun, 24 May 2020 00:34:57 -0400

Add newline to sed 'i' commands as well

Diffstat:
Mcompile | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/compile b/compile @@ -202,7 +202,8 @@ set_html_toc() sed -i -e "/toc-title/a\\ <ul><ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul></ul>" \ "$outputFile" - sed -i -e "/<h5>$tocEntry<\/h5>/i </section>\n<section>" \ + sed -i -e "/<h5>$tocEntry<\/h5>/i\\ + </section>\n<section>" \ "$outputFile" elif echo "$tocEntry" | grep -qi "^sub:"; then tocEntry="$(echo "$tocEntry" | cut -d':' -f2-)" @@ -211,7 +212,8 @@ set_html_toc() sed -i -e "/toc-title/a\\ <ul><li><a href=\"#$tocEntryId\">$tocEntry</a></li></ul>" \ "$outputFile" - sed -i -e "/<h4>$tocEntry<\/h4>/i </section>\n<section>" \ + sed -i -e "/<h4>$tocEntry<\/h4>/i\\ + </section>\n<section>" \ "$outputFile" else tocEntryId="$(echo "$tocEntry" | tr ' ' '-' \ @@ -219,13 +221,15 @@ set_html_toc() sed -i -e "/toc-title/a\\ <li><a href=\"#$tocEntryId\">$tocEntry</a></li>" \ "$outputFile" - sed -i -e "/<h3>$tocEntry<\/h3>/i </section\>\n<section>" \ + sed -i -e "/<h3>$tocEntry<\/h3>/i\\ + </section\>\n<section>" \ "$outputFile" fi done sed -i -e "/toc-title/a <ul>" "$outputFile" sed -i -e "/END OF HEADER FILE/a <section>" "$outputFile" - sed -i -e "/<\/main>/i </section>" "$outputFile" + sed -i -e "/<\/main>/i\\ + </section>" "$outputFile" } for file in "$@"; do