Review available Markdown Syntax
See original GitHub issueA list of markdown items that we should review in addition to discussions on Jmarkdown
, RST
support etc.
- http://scholarlymarkdown.com/ - seems to be behind planned schedule
fall 2015
but may have some useful ideas for consideration. - https://spec.commonmark.org/0.29/
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Markdown Code Reviews - Code With Engineering Playbook
markdownlint is a linter for markdown that verifies Markdown syntax, and also enforces rules that make the text more readable. Markdownlint-cli is an...
Read more >Using Markdown | Documentation - Review Board
Markdown supports both ordered (numbered) and unordered (bulleted) lists. These are written using a natural syntax. Ordered lists use numbers followed by ...
Read more >Markdown Syntax Documentation - Daring Fireball
To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like...
Read more >Supported Markdown syntax | Upsource - JetBrains
Upsource supports Markdown in review and discussion comments. Here is the syntax ... Task lists are available in version 2018.1 and higher.
Read more >20+ Useful Markdown Syntaxes for Developers
Highlighting a code block is a much-needed feature for technical documentation and blogs. We have seen the syntax for the inline code previously ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve spent a little bit of time looking into Markdown flavors that might be of interest and wanted to update this issue with some more perspective.
First off, I think this is the main takeaway (it is a suggestion, not a directive): our build system should support a strict subset of Pandoc markdown or RMarkdown. It could do this in addition to another language like rST.
Why support Pandoc Markdown?
I spoke with a few folks at RStudio which is the main driver behind RMarkdown. This is the flavor of markdown supported by bookdown. It has proven resilient and quite popular in the R community, and supports many of the features that we’d need for publishing. RMarkdown is a subset of Pandoc markdown (here is a summary of pandoc markdown and here is the announcement that RMarkdown is a subset of pandoc markdown). This means that if we were to support the same subset of Pandoc Markdown, then we’d be supporting a language that is already utilized by a huge community of people.
How would we support this?
Here is a useful post with information on what we’d need to do to support this.
I think there are two options to supporting pandoc markdown.
In either case, we’d want to define a subset of Pandoc markdown syntax that we wish to support, and then create a mapping from that subset onto either docutils objects or rST. This could be a standalone Sphinx extension that would be really useful for the community outside of just this project.
As a side note, here’s an interesting post about the differences between pandoc MD vs rST
@chrisjsewell has already made a really interesting implementation of this approach here: https://github.com/ExecutableBookProject/meta/pull/12
A few caveats
There are a few potential pitfalls to this…here are some that I can think of:
What about directives and roles?
The biggest question to my mind is what to do about directives and roles (if we are using Sphinx under the hood). These are one of the most powerful features in Sphinx, and something we could take advantage of to extend new features for books. But, there are no native “directives and roles” features in markdown.
One idea would be to piggy-back on Pandoc markdown syntax for these.
Directives
In rST directives look like this:
In markdown, this might be utilized with Pandoc syntax. For example, Pandoc allows you to separate
<div>
elements with fences like so:Perhaps the pattern of
::: something
could be mapped onto directives in rST. For example, something like:Roles
For in-line markup, we could use the “bracketed spans” syntax from Pandoc markdown. This is intended to making custom “span” elements in your text like so:
However, we could piggy-back on this by defining some specific roles, e.g.:
Curious what folks think about that…
I’ll update this issue if I can think of some other things to consider…
Was going through the CommonMark forums and found an interesting comment from JGM re: extension syntax in markdown: https://talk.commonmark.org/t/support-for-extension-token/2771/7