From f492aa962b4c0627dd013f074c0d01000f6e70fe Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 10 Mar 2022 07:40:38 +0000 Subject: [PATCH] fix: Add discount markdown as alternative parser The awk script is nice, but it doesn't parse codeblocks, and was a bit limited. Although discount's markdown is written in C, it is still a bit bulky. Still, I would recommend it as a more convenient option. This represents a compromise between suckless principles and usability, so I have not set this as the default option. --- bin/contrib/discount.rc | 4 ++++ etc/initrc | 1 + 2 files changed, 5 insertions(+) create mode 100644 bin/contrib/discount.rc diff --git a/bin/contrib/discount.rc b/bin/contrib/discount.rc new file mode 100644 index 0000000..87af260 --- /dev/null +++ b/bin/contrib/discount.rc @@ -0,0 +1,4 @@ +#!/usr/bin/rc +# requires discount markdown: https://www.pell.portland.or.us/~orc/Code/discount/ +markdown -f fencedcode -f ext $1 + diff --git a/etc/initrc b/etc/initrc index f0b26c2..f38f09a 100755 --- a/etc/initrc +++ b/etc/initrc @@ -26,6 +26,7 @@ path=($plan9port/bin . ./bin ./bin/contrib /bin /usr/bin) # formatter, but all major functionality should should be formatter agnostic. #formatter=(fltr_cache markdown.pl) formatter=(fltr_cache md2html.awk) # no perl for old men +# formatter=(fltr_cache discount.rc) # use C for ze modern comforts. Requires https://www.pell.portland.or.us/~orc/Code/discount/ # Enable debugging, to disable set to () debug=true