Proposal: Standardize listing of Markdown Flavors used in the MD document: GLFM, GFM, QMD, etc

未关闭
#830 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
markdown
领域
documentation

调研方向

Start by reviewing the proposal in issue #830 and the flavor vocabulary and references in RFC 7764 section 3. The issue names no repository files, tests, or implementation entry point. Done would require agreement on a standardized front matter key, naming vocabulary, and priority semantics before implementation work can be defined.

由索引模型根据 Issue 内容生成。

描述

Standardizing a single common Markdown syntax seems like an impossible challenge!

So, now we already have a lot of different popular “flavors” for Markdown syntax: CommonMark, GitLab Flavored Markdown (GLFM), GitHub Flavored Markdown (GFM), Quarto (QMD), Markdown Extra, MultiMarkdown, R Markdown, etc.

And have a lot of .md files that can use different flavors, even more than one in a single document…

But we have no standardized approach to describe which flavors should be used to render this specific .md file!

As a result, file viewers can only guess which flavor to try to apply to render the document correctly!

Let’s fix this by proposing a standard to list the flavors, used in the current document, to give the viewers and renderers a clue how to render this Markdown file correctly.

My proposal is to recommend using the Front Matter block with the flavors key like this:

---
title: Foo
flavors:
  - GFM
  - R-Markdown
---
The markdown body.

The list of flavor names is already tracked in the RFC 7764 , as I understand, so we can use the naming vocabulary from there, and the RFC contains links to the references.

Also, we can name this key not as flavors but as extensions or plugins to be clearer.

The list of flavors is an array, to make it possible to set the priorities (first is the winner) of how to render specific blocks, if they are covered by more than one flavor.

Alternatively, we can put a link to the specifications in addition to the flavor name (unique ID) in this list, but in such a case, we should standardise the format of the specification, which is a hard challenge too.

What do you think about this idea?

主要语言
Python
星标
5.2k
派生
360
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

commonmark/commonmark-spec 的其他 Issue

查看 commonmark/commonmark-spec 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。