Markdown 的 MIME 类型是什么? [英] What is the MIME type for Markdown?

查看:33
本文介绍了Markdown 的 MIME 类型是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道 Markdown 是否存在 MIME 类型?我猜它是 text/plain,但有更具体的吗?

Does anyone know if there exists a MIME type for Markdown? I guess it is text/plain, but is there a more specific one?

推荐答案

tl;dr: text/markdown from March 2016

2016 年 3 月,text/markdown 注册为 RFC7763 在IETF.

tl;dr: text/markdown since March 2016

In March 2016, text/markdown was registered as RFC7763 at IETF.

以前,它应该是 text/x-markdown.下面的文字描述了 2016 年 3 月之前的情况,当时 RFC7763 还是一个草案.

Previously, it should have been text/x-markdown. The text below describes the situation before March 2016, when RFC7763 was still a draft.

没有关于 Gruber 的定义的官方建议,但该主题在官方邮件列表,并到达选择text/x-markdown.

There is no official recommendation on Gruber’s definition, but the topic was discussed quite heavily on the official mailing-list, and reached the choice of text/x-markdown.

这个结论被后来挑战,已得到确认,并且可以被 IMO 视为共识.

This conclusion was challenged later, has been confirmed and can be, IMO, considered consensus.

这是缺乏官方 mime 类型的唯一合乎逻辑的结论:text/ 将在几乎所有地方提供适当的默认值,x- 因为我们没有使用官方类型,markdown 而不是 gruber. 或其他任何类型,因为这种类型现在很常见.

This is the only logical conclusion in the lack of an official mime type: text/ will provide proper default almost everywhere, x- because we're not using an official type, markdown and not gruber. or whatever because the type is now so common.

仍然有未知数不过,Markdown 的风味".我想有人应该注册一个官方类型,这应该是easy,但我怀疑除了 John Gruber 之外还有人敢这样做,因为他最近 证明了他对 Markdown 的执着.

There are still unknowns regarding the different "flavors" of Markdown, though. I guess someone should register an official type, which is supposedly easy, but I doubt anyone dares do it beyond John Gruber, as he very recently proved his attachment to Markdown.

IETF 上有一个草案,用于text/markdown,但内容似乎根本没有描述 Markdown,所以在它更完整之前我不会使用它.

There is a draft on the IETF for text/markdown, but the contents do not seem to describe Markdown at all, so I wouldn't use it until it gets more complete.

这篇关于Markdown 的 MIME 类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆