diff --git a/bin/html.sed b/bin/html.sed new file mode 100644 index 000000000..b81a37064 --- /dev/null +++ b/bin/html.sed @@ -0,0 +1,32 @@ +#!/usr/bin/env sed +# +# bin/html.sed - translate certain characters to HTML & entities +# +# This script was written in 2024 November by: +# +# @xexyl +# https://xexyl.net Cody Boone Ferguson +# https://ioccc.xexyl.net +# +# "Because sometimes even the IOCCC Judges need some help." :-) +# +# This script will take certain characters, for instance '<', and convert them +# to their respective html entity, for instance '<', so that html lints do +# not complain. +# +# usage: +# +# cmd | sed -f bin/html.sed +# +# sed -f bin/html.sed file > output +# +# sed -i -f bin/html.sed file +# +# VERSION="1.0 2024-11-04" + +# IMPORTANT NOTE: the '&' substitution MUST come first! This is because the +# other substitutions have '&'s in them and if the '&' came after it would +# corrupt the '&'s in the string. +s/&/\&/g +s//\>/g