美文网首页马文的地下室
学习笔记《Markdown》

学习笔记《Markdown》

作者: 马文Marvin | 来源:发表于2016-09-16 04:28 被阅读61次

从第一次在简书写 Markdown 格式的文章以来,就再也没有使用过所见即所得编辑器,算算也只有半年左右的时间,但是喜爱程度,真的是无以复加,刚好团队准备把 Markdown 引入到项目里面,所以专门学习了一下

Markdown 语法的创造者是 John Gruber,他在2004年发布了 Markdown 语法的第一版并维护到现在,有意思的话,他现在业余在做一个叫做 The Talk Show 的 podcast,可以在苹果的 podcast 里面订阅,Aaron Swartz 也参与了 Markdown 标准的制定,对,就是那个让人敬佩而又遗憾的 Aaron Swartz

维基百科上有详细的历史梗概介绍:
https://en.wikipedia.org/wiki/Markdown

Markdown 实际上没有正式的官方标准,John Gruber 本人在2004年发布了 Markdown 1.0.1 属于最起先的版本:
http://daringfireball.net/projects/markdown/
基本语法:
http://daringfireball.net/projects/markdown/syntax

后来人对 Markdown 做了不少的语法改进,包括:

  • CommonMark
  • Markdown Extra

Markdown 的标准化也在紧锣密鼓的制定中:

In March 2016 RFC 7763 and RFC 7764 were published. RFC 7763 introduced MIME type text/markdown with the original variant. RFC 7764 discusses and registered the variants MultiMarkdown, GitHub Flavored Markdown (GFM), Pandoc, CommonMark, and Markdown Extra among others

simplemde

最初选择使用了这个叫做 simplemde 的编辑器,这个编辑器是用的 marked 作为解析器:https://github.com/chjj/marked

└─┬ vue-simplemde@0.3.7
  └─┬ simplemde@1.11.2
    └── marked@0.3.6

SimpleMDE began as an improvement of lepture's Editor project, but has now taken on an identity of its own. It is bundled with CodeMirror and depends on Font Awesome.
CodeMirror is the backbone of the project and parses much of the Markdown syntax as it's being written. This allows us to add styles to the Markdown that's being written. Additionally, a toolbar and status bar have been added to the top and bottom, respectively. Previews are rendered by Marked using GFM.

markdown-it

目前选择的是 markdown-it,原因是 markdown-it 属于基于 CommonMark 这套相对比较主流的标准的,围绕其的生态在未来也许会有不错的稳定性:

From 2012, a group of people including Jeff Atwood launched what Atwood characterized as a standardization effort. A community website now aims to "document various tools and resources available to document authors and developers, as well as implementors of the various markdown implementations". In September 2014, Gruber objected to the usage of "Markdown" in the name of this effort and it was rebranded as a new dialect named CommonMark. CommonMark.org published several versions of a specification, reference implementation, and test suite, and "[plans] to announce a finalized 1.0 spec and test suite in 2017."
In 2017 GitHub released a formal specification of their GitHub Flavored Markdown (GFM) that is based on CommonMark. It follows the CommonMark specification exactly except for tables, strikethrough, autolinks and task lists, which the GitHub spec has added as extensions.

https://github.com/commonmark/CommonMark/wiki/List-of-CommonMark-Implementations

markdown-it 本身支持的插件也非常的多,目前有150多个:
https://www.npmjs.com/browse/keyword/markdown-it

相关文章

  • MARKDOWN学习笔记

    标题 # MARKDOWN学习笔记 MARKDOWN学习笔记 MARKDOWN学习笔记- MARKDOWN学习笔记...

  • 文章目录

    Markdown学习 Markdown学习 Java学习 Servlet学习笔记 Java问题 Tomcat问题修...

  • markdown笔记

    markdown学习笔记 https://ouweiya.gitbooks.io/markdown 标题 强调 这...

  • 课堂学习部分摘要

    10月4日 学习markdown 语法 有道云笔记markdown指南 学习markdown语法,是文体内容简洁规...

  • Markdown 语法学习笔记

    Markdown 语法学习笔记 学习 Markdown 语法说明做的笔记 写了一些例子,按这些例子自己动手输入一遍...

  • 第一周总结

    本周完成的主要学习内容有: 学习使用Markdown写一篇简书 学习使用Markdown[笔记] https:...

  • Markdown 基本语法

    Markdown语法 当前文档仅用作个人学习笔记,来源: Markdown 中文文档 概述设计理念Markdown...

  • 【JS】自制简单的Markdown编辑器

    瞎扯 现在 markdown 来编写 笔记,是非常流行的一种语言. 学习 markdown 的难度很低, 只要学习...

  • markdown 学习笔记

    MarkDown笔记   为了在github上记录自己的学习过程中,今天特地学习了markdown。markdow...

  • 生信学习小组 D1

    Day 1 学习笔记 markdown 学习笔记 学习常见语法,加粗 斜体 斜体+加粗 插入图片 代码块 插入图...

网友评论

    本文标题:学习笔记《Markdown》

    本文链接:https://www.haomeiwen.com/subject/kbtjettx.html