-
-
Notifications
You must be signed in to change notification settings - Fork 214
Description
Problem Description
Given the proliferation and ubiquity of GitHub, I believe many unassuming developers (myself included) naively believed what Markdown syntax is supported on GH is part of the original 2004 Markdown spec. Even if developers knew the difference, that they would prefer GitHub as that's what's most common. #64 suggests this conflation is a problem.
I personally stumbled across then when I wanted a URL to automatically be hyperlinked with pdoc, not realizing the original spec requires the URLs to be wrapped in < and > characters. In a phrase: I've become spoiled by GFM.
Proposal
Support the GitHub Flavored Markdown spec.
This can take place in a few possible ways:
- via a new
-d gfmor-d github-markdownflag, reserving the-d markdownflag for the original 2004 spec - replace the Markdown support in
pdocwith the GFM version by default, optionally exposing a-d original-markdownfor the 2004 spec - A "pick n choose" approach where the most popular/used parts of GFM are supported on top of the current Markdown implementation (I don't really advocate for this one)
Alternatives
I guess not supporting GFM at all?
Independent of my proposal, pdoc should probably declare what version or flavour we colloquially know/call as "Markdown". The original is from 2004 released as a Perl script and has remained largely unchanged, warts and all.
CommonMark appears to be the, well, common and well-defined and versioned specification of the original Markdown. Indeed, GFM is derived from CommonMark!
I would hope that pdoc would choose a version of the CommonMark spec and support that version explicitly.
Additional context
The Differences from original Markdown section of commonmark-spec's README is enlightening.