GitHub Flavored Markdown
   HOME

TheInfoList



OR:

Markdown is a
lightweight markup language A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightwei ...
for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a
markup language Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online forums, collaborative software,
documentation Documentation is any communicable material that is used to describe, explain or instruct regarding some attributes of an object, system or procedure, such as its parts, assembly, installation, maintenance and use. As a form of knowledge manageme ...
pages, and readme files. The initial description of Markdown contained ambiguities and raised unanswered questions, causing implementations to both intentionally and accidentally diverge from the original version. This was addressed in 2014, when long-standing Markdown contributors released
CommonMark Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown i ...
, an unambiguous specification and test suite for Markdown.


History

Markdown was inspired by pre-existing
conventions Convention may refer to: * Convention (norm), a custom or tradition, a standard of presentation or conduct ** Treaty, an agreement in international law * Convention (meeting), meeting of a (usually large) group of individuals and/or companies in a ...
for marking up plain text in email and usenet posts, such as the earlier markup languages setext ''(c. 1992)'', Textile ''(c. 2002)'', and reStructuredText ''(c. 2002)''. In 2002 Aaron Swartz created atx and referred to it as “the true structured text format”. Swartz and Gruber then worked together to create the Markdown language in 2004, with the goal of enabling people "to write using an easy-to-read and easy-to-write plain text format, optionally convert it to structurally valid XHTML (or HTML)."Markdown 1.0.1 readme source code Its key design goal was ''readability'', that the language be readable as-is, without looking like it has been marked up with tags or formatting instructions, unlike text formatted with ‘heavier’
markup language Markup language refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
s, such as
Rich Text Format ) As an example, the following RTF code would be rendered as follows: This is some bold text. Character encoding A standard RTF file can only consist of 7-bit ASCII characters, but can use escape sequences to encode other characters. Th ...
(RTF), HTML, or even wikitext (each of which have obvious in-line tags and formatting instructions which can make the text more difficult for humans to read). Gruber wrote a Perl script, , which converts marked-up text input to valid, well-formed XHTML or HTML and replaces angle brackets (, ) and
ampersand The ampersand, also known as the and sign, is the logogram , representing the conjunction "and". It originated as a ligature of the letters ''et''—Latin for "and". Etymology Traditionally in English, when spelling aloud, any letter that ...
s () with their corresponding
character entity references In SGML, HTML and XML documents, the logical constructs known as ''character data'' and ''attribute values'' consist of sequences of characters, in which each character can manifest directly (representing itself), or can be represented by a series ...
. It can take the role of a standalone script, a plugin for
Blosxom Blosxom is a free-software weblog program (and simple content management system) written in Perl by Rael Dornfest. It uses the pre-existing file system instead of a database management system, unlike most blog software. The design of Blosxom i ...
or a Movable Type, or of a text filter for BBEdit.


Rise and divergence

As Markdown's popularity grew rapidly, many Markdown implementations appeared, driven mostly by the need for additional features such as tables, footnotes, definition lists,Technically HTML description lists. and Markdown inside HTML blocks. The behavior of some of these diverged from the reference implementation, as Markdown was only characterised by an informal specification and a Perl implementation for conversion to HTML. At the same time, a number of ambiguities in the informal specification had attracted attention. These issues spurred the creation of tools such as Babelmark to compare the output of various implementations, and an effort by some developers of Markdown parsers for standardisation. However, Gruber has argued that complete standardization would be a mistake: "Different sites (and people) have different needs. No one syntax would make all happy." Gruber avoided using curly braces in Markdown to unofficially reserve them for implementation-specific extensions.


Standardization

From 2012, a group of people, including Jeff Atwood and
John MacFarlane John is a common English name and surname: * John (given name) * John (surname) John may also refer to: New Testament Works * Gospel of John, a title often shortened to John * First Epistle of John, often shortened to 1 John * Second E ...
, launched what Atwood characterised as a standardisation 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 CommonMark. CommonMark.org published several versions of a specification, reference implementation, test suite, and "
lans Lans or LANS may refer to: Places * Lans, Tyrol, a municipality in Tyrol, Austria * Lake Lans, a lake near Lans, Tyrol France * Lans, Saône-et-Loire * Lans-en-Vercors, a community near Grenoble in the Vercors * Villard-de-Lans, a community and s ...
to announce a finalized 1.0 spec and test suite in 2019." No 1.0 spec has since been released as major issues still remain unsolved. Nonetheless, the following websites and projects have adopted CommonMark:
Discourse Discourse is a generalization of the notion of a conversation to any form of communication. Discourse is a major topic in social theory, with work spanning fields such as sociology, anthropology, continental philosophy, and discourse analysis. ...
, GitHub, GitLab, Reddit, Qt, Stack Exchange ( Stack Overflow), and Swift. In March 2016 two relevant informational Internet RFCs were published: * introduced MIME type . * discussed and registered the variants
MultiMarkdown MultiMarkdown is a lightweight markup language created by Fletcher T. Penney as an extension of the Markdown format. It supports additional features not available in plain Markdown syntax. There is also a text editor with the same name that suppo ...
, GitHub Flavored Markdown (GFM), Pandoc, and Markdown Extra among others.


Variants

Websites like GitHub, Bitbucket, Reddit,
Diaspora A diaspora ( ) is a population that is scattered across regions which are separate from its geographic place of origin. Historically, the word was used first in reference to the dispersion of Greeks in the Hellenic world, and later Jews after ...
, Stack Exchange,
OpenStreetMap OpenStreetMap (OSM) is a free, open geographic database updated and maintained by a community of volunteers via open collaboration. Contributors collect data from surveys, trace from aerial imagery and also import from other freely licensed g ...
and SourceForge use variants of Markdown to facilitate discussion between users. Depending on implementation, basic inline HTML tags may be supported. Italic text may be implemented by _underscores_ and/or *single-asterisks*.


GitHub Flavored Markdown

GitHub had been using its own variant of Markdown since as early as 2009, adding support for additional formatting such as tables and nesting block content inside list elements, as well as GitHub-specific features such as auto-linking references to commits, issues, usernames, etc. In 2017, GitHub released a formal specification of its GitHub Flavored Markdown (GFM) that is based on CommonMark. It is a strict superset of CommonMark, following its specification exactly except for ''tables, strikethrough, autolinks and task lists,'' which GFM adds as extensions. GitHub also changed the parser used on their sites accordingly, which required that some documents be changed. For instance, GFM now requires that the
hash symbol The symbol is known variously in English-speaking regions as the number sign, hash, or pound sign. The symbol has historically been used for a wide range of purposes including the designation of an ordinal number and as a Typographic ligature, ...
that creates a heading be separated from the heading text by a space character.


Markdown Extra

Markdown Extra is a
lightweight markup language A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightwei ...
based on Markdown implemented in PHP (originally), Python and Ruby. It adds features not available with plain Markdown syntax. Markdown Extra is supported in some
content management system A content management system (CMS) is computer software used to manage the creation and modification of digital content (content management).''Managing Enterprise Content: A Unified Content Strategy''. Ann Rockley, Pamela Kostur, Steve Manning. New ...
s such as
Drupal Drupal () is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide ...
and TYPO3. Markdown Extra adds the following features to Markdown: * Markdown markup inside HTML blocks * Elements with id/class attribute * "Fenced code blocks" that span multiple lines of code * Tables * Definition lists * Footnotes * Abbreviations


LiaScript

LiaScript is a Markdown dialect that was designed to create interactive educational content. It is implemented in Elm and TypeScript and adds additional syntax elements to define features like: * Animations * Automatic speech output * Mathematical formulas (using
KaTeX Katex (; av, Катихъ) is a village at the foot of the Caucasian Mountains and the second most populous municipality in the Balakan District of Azerbaijan. The village (called Katekhi () in Georgian) and its Katekhi Church are mentioned by Ca ...
) *
ASCII art ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963 and ASCII compliant chara ...
diagrams * Various types of quizzes and surveys * JavaScript is natively supported and can be attached to various elements, this way code fragments can be made executable and editable


Examples


Implementations

Implementations of Markdown are available for over a dozen programming languages; in addition, many applications, platforms and
frameworks A framework is a generic term commonly referring to an essential supporting structure which other things are built on top of. Framework may refer to: Computing * Application framework, used to implement the structure of an application for an op ...
support Markdown. For example, Markdown
plugins Plug-in, plug in or plugin may refer to: * Plug-in (computing) is a software component that adds a specific feature to an existing computer program. ** Audio plug-in, adds audio signal processing features ** Photoshop plugin, a piece of software t ...
exist for every major blogging platform. While Markdown is a minimal markup language and is read and edited with a normal text editor, there are specially designed editors that preview the files with styles, which are available for all major platforms. Many general-purpose text and code editors have syntax highlighting plugins for Markdown built into them or available as optional download. Editors may feature a side-by-side preview window or render the code directly in a WYSIWYG fashion. Here are some apps, services and editors that support Markdown as an editing format: * Microsoft Teams: chat messages * Discord: chat messages * JotterPad: an online WYSIWYG editor that supports Markdown and fountain * Doxygen: a source code documentation generator which supports Markdown with extra features *
RStudio RStudio is an integrated development environment for R, a programming language for statistical computing and graphics. It is available in two formats: RStudio Desktop is a regular desktop application while RStudio Server runs on a remote server ...
: an IDE for R. It provides a C++ wrapper function for a markdown variant called sundown * GitHub Flavored Markdown (GFM) ignores underscores in words, and adds syntax highlighting, task lists, and tables * RMarkdown * Nextcloud Notes: the default app for taking notes on the Nextcloud platform supports formatting using Markdown * Joplin: a note-taking application that supports markdown formatting *
Simplenote Simplenote is a note-taking application with Markdown support. In addition to being accessible via most web browsers, cross-platform apps are available on Android, Linux, Windows, iOS, and macOS. Simplenote has an externally accessible API, allo ...
* Obsidian.md * The
GNOME Evolution GNOME Evolution (formerly Novell Evolution and Ximian Evolution, prior to Novell's 2003 acquisition of Ximian) is the official personal information manager for GNOME. It has been an official part of GNOME since Evolution 2.0 was included with th ...
email client supports composing messages in Markdown format, with the ability to send and render emails in pure Markdown format (Content-Type: text/markdown;) or to convert Markdown to plaintext or
HTML email HTML email is the use of a subset of HTML to provide formatting and semantic markup capabilities in email that are not available with plain text: Text can be linked without displaying a URL, or breaking long URLs into multiple pieces. Text is ...
when sending. * The Mozilla Thunderbird email client supports Markdown through the
Markdown here Revival
add-on. *
Kanboard Kanboard is a project management open source software application that uses a Kanban board to implement the Kanban process management system. Features include a minimal drag-and-drop web user interface, a command line interface and ability to ...
uses the standard Markdown syntax as its only formatting syntax for task descriptions. *
Discourse Discourse is a generalization of the notion of a conversation to any form of communication. Discourse is a major topic in social theory, with work spanning fields such as sociology, anthropology, continental philosophy, and discourse analysis. ...
uses the CommonMark flavor of Markdown in the forum post composer. * Bugzilla uses a customized version of Markdown.


See also

* Comparison of document markup languages * Comparison of documentation generators *
Lightweight markup language A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightwei ...
* Wiki markup


Explanatory notes


References


External links

* for original John Gruber markup {{Authority control, state=autocollapse Computer-related introductions in 2004 Lightweight markup languages Open formats