look into Markdown module options
Had a bug report (via suggestions) that our current Markdown module doesn't support the full range of Markdown: the things they called out as missing were specifically:
- double-tildes as strikethrough
- double-equal signs (==) as highlighting
- subheadings
- codeblocks
- subscript
- superscript
- footnotes
It looks like we're using Text::Markdown, which was last updated 2010. If someone has energy, we should look to see if there's a more current module that handles a full range of Markdown. (I know there is controversy over what Markdown features are Actually Markdown because there's no real standard and I do not want to wind up maintaining our own custom version like every other site out there does, but there might be a better option.)
there's no real standard
I think commonmark is what everyone goes for compatibility with these days. all the major git forges, at least, use it as a base for their syntax
Looks like that's implemented as https://metacpan.org/dist/Markdown-Perl . Tagging in @nfagerlund to see if we'd have to version anything like we had to do before?
Definitely worthy of a version bump! 👍🏼 Thanks for remembering to check that.
The theory is that your old posts should never get retroactively mangled (even a little bit) when we add a new feature for new posts. Markdown compatibility is diabolically subtle even with libraries that are trying to speak the same dialect (and Commonmark is a deliberate break), so I'm about 100% sure we couldn't swap out renderers without mangling old posts. Ergo, bump it. 🔈
I think it goes a lil like this:
- Keep Text::Markdown (or something bug-for-bug compatible) as a dependency, so we can keep using it on old content that expects it.
- Add a new
markdown1format in Formats.pm and follow whateverhtml_casual0andhtml_casual1are doing. (Oh hey, looks like I left explanatory comments, nice.) - Add a new format opts item for telling markdown 0 and 1 apart, and branch on it in the body of
clean()to decide which renderer to invoke.
w00t, thanks for the implementation notes!