question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support GitHub Flavored Markdown or at least CommonMark

See original GitHub issue

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. https://github.com/mitmproxy/pdoc/issues/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 gfm or -d github-markdown flag, reserving the -d markdown flag for the original 2004 spec
  • replace the Markdown support in pdoc with the GFM version by default, optionally exposing a -d original-markdown for 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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
f3ndotcommented, Jun 7, 2022

Ok makes sense! Thanks for entertaining the request. I may submit a PR adding documentation or a section into the README describing that pdoc supports the original Markdown specification along with a discrete set of extensions/extras to disambiguate/reduce confusion for people in the future.

0reactions
mhilscommented, Nov 15, 2022

Done, thanks for the good suggestion! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Flavored Markdown Spec
Markdown is a plain text format for writing structured documents, based on conventions for indicating formatting in email and usenet posts. It ...
Read more >
A formal spec for GitHub Flavored Markdown
This formal specification is based on CommonMark, an ambitious project to formally specify the Markdown syntax used by many websites on the ...
Read more >
GitHub flavored markdown (GFM) - MDX
This guide explores how to support GFM features such as autolink literals, footnotes, strikethrough, tables, and task lists.
Read more >
GitLab Flavored Markdown (GLFM)
GitLab Flavored Markdown extends the CommonMark specification. It was inspired by GitHub Flavored ... for a list of all supported emoji codes. :thumbsup:....
Read more >
CommonMark: A Formal Specification For Markdown
CommonMark's Markdown Syntax Support # · Paragraphs and Line Breaks, · Headers, · Emphasis and Strong Emphasis, · Horizontal Rules, · Lists, ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found