aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-09 19:33:41 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-09 19:33:41 +0100
commit7db61c4a1116c0f09baf6e4cc04488e0f7584dee (patch)
tree7c0d669e831ed7456a0331efcb21403abc891a5a
parent9a1b50d542ec9000f62628a4e5ff3a5c53538ebb (diff)
add markdown support
-rwxr-xr-xscrubs8
1 files changed, 6 insertions, 2 deletions
diff --git a/scrubs b/scrubs
index a4b42ee..452db3c 100755
--- a/scrubs
+++ b/scrubs
@@ -26,7 +26,9 @@ todos() {
sed -e "s/^\*\//\\\\033[2;3;39m$hborderbot\\\\033[0m\\\\n/g" | \
sed -e 's/^\*/ /g' | \
sed -E 's/@category (.*)/\\033[34m\1\\033[0m/g' | \
- sed -E 's/@([^ ]*)[ ]*(.*)/\\033[2m\1\\033[0m \\033[33m\2\\033[0m/g')\n"
+ sed -E 's/@([^ ]*)[ ]*(.*)/\\033[2m\1\\033[0m \\033[33m\2\\033[0m/g' | \
+ sed -E 's/__([^__]*)__/\\033[1m\1\\033[0m/g' | \
+ sed -E 's/_([^_]*)_/\\033[3m\1\\033[0m/g')\n"
}
get_docs() {
@@ -56,7 +58,9 @@ doc() {
sed -e 's/^\*/ /g' | \
sed -E 's/@type (.*)/\\033[32m\1\\033[0m/g' | \
sed -E 's/@name (.*)/\\033[34m\1\\033[0m/g' | \
- sed -E 's/@([^ ]*)[ ]*(.*)/\\033[2m\1\\033[0m \\033[33m\2\\033[0m/g')
+ sed -E 's/@([^ ]*)[ ]*(.*)/\\033[2m\1\\033[0m \\033[33m\2\\033[0m/g' | \
+ sed -E 's/__([^__]*)__/\\033[1m\1\\033[0m/g' | \
+ sed -E 's/_([^_]*)_/\\033[3m\1\\033[0m/g')
if [ "$(printf "%s" "$output" | wc -l)" -eq 0 ]; then
printf "%s\n" "There is no documentation for '$1' '$2'"