March, 20, 2024 archives
Now with Markdown, finally
Since the beginning (almost 24 years ago), my entries here have always been written in HTML with just a simple expansion of blank lines to create paragraphs.
A little over 20 years ago, a syntax for marking up plain text called Markdown was released and it has proven to be a fairly persistent and resilient success. And technically, my HTML with blank lines is compatible with Markdown.
That means that now I have plugged in a Markdown parser where my paragraph expansion was, and it just works and I can start using other syntax.
This is all heading down the path where I can plug in more text transformations, like server-side syntax highlighting for code.
<?php
echo "That would be nice.";
?>
(That won’t be highlighted yet, but whenever I do plug in syntax highlighting it should just happen.)
I’m using the Parsedown PHP library for turning Markdown into HTML, but it seems to be unmaintained and I may swap in something else.
It is possible that the Markdown parsing will mangle some old entries, but a quick scan of entries from this year looks okay, and I can easily fix stuff as I run across it. (I did already fix one very old entry that had some mangled HTML which just kinda worked before but got escaped with the new parser.)