Pretty-print Markdown on the console
With Large Language Models loving to output Markdown responses, I’ve been wanting to display those Markdown snippets nicely in the console, when developing some LLM-powered apps and experiments. At first, I thought I could use a Markdown parser library, and implement some kind of output formatter to display the text nicely, taking advantage of ANSI color codes and formats. However it felt a bit over-engineered, so I thought “hey, why not just use some simple regular expressions!” (and now you’ll tell me I have a second problem with regexes)
Read more...