community-cypher-system-ref.../scripts/base/010-strip-terminal-whitespace.sh
Brian S. Stephan 50fd495b2c
replace non-breaking space characters with spaces
this is a formatting/publishing artifact that we don't need in the
Markdown, and the existence of those characters is throwing off some
other scripts

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2025-04-04 13:19:53 -05:00

10 lines
525 B
Bash
Executable File

#!/bin/sh
# Remove extra whitespace from the end of lines, since it throws off some further
# formatting cleanups. There's no real pattern to when this happens; I think it's
# just a copy and paste problem in the source doc, so there's no real ability to
# make further improvements --- just remove the spaces and let other things clean
# it up.
# Also convert some non-breaking spaces and that kind of thing in there randomly.
sed -E 's/\xc2\xa0/ /g' _tmp/ccsrd.md > _tmp/ccsrd.new.md
sed -E 's/\s+$//' -i _tmp/ccsrd.new.md