idnits 2.17.1 draft-ietf-appsawg-text-markdown-use-cases-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 155 has weird spacing: '... markup form...' -- The document date (September 3, 2015) is 3159 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- == Missing Reference: 'Haskell' is mentioned on line 801, but not defined == Outdated reference: A later version (-12) exists of draft-ietf-appsawg-text-markdown-11 -- Obsolete informational reference (is this intentional?): RFC 793 (Obsoleted by RFC 9293) Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Applications Area Working Group S. Leonard 3 Internet-Draft Penango, Inc. 4 Intended Status: Informational September 3, 2015 5 Expires: March 6, 2016 7 Guidance on Markdown: 8 Design Philosophies, Stability Strategies, and Select Registrations 9 draft-ietf-appsawg-text-markdown-use-cases-06 11 Abstract 13 This document elaborates upon the text/markdown media type for use 14 with Markdown, a family of plain text formatting syntaxes that 15 optionally can be converted to formal markup languages such as HTML. 16 Background information, local storage strategies, and additional 17 syntax registrations are supplied. 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 Copyright Notice 36 Copyright (c) 2015 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Dive Into Markdown . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. On Formats . . . . . . . . . . . . . . . . . . . . . . . . 3 53 1.2. Markdown Design Philosophy . . . . . . . . . . . . . . . . 4 54 1.3. Uses of Markdown . . . . . . . . . . . . . . . . . . . . . 5 55 1.4. Uses of Labeling Markdown Content as text/markdown . . . . 5 56 1.5. Definitions . . . . . . . . . . . . . . . . . . . . . . . . 6 57 2. Strategies for Preserving Media Type and Parameters . . . . . 6 58 2.1. Map to Filename and Attributes . . . . . . . . . . . . . . 7 59 2.2. Store Headers in Adjacent File . . . . . . . . . . . . . . 8 60 2.3. "Arm" Content with MIME Headers . . . . . . . . . . . . . . 8 61 2.4. Create a Local Batch Script . . . . . . . . . . . . . . . . 8 62 2.5. Process the Markdown in Advance . . . . . . . . . . . . . . 9 63 2.6. Rely on Context . . . . . . . . . . . . . . . . . . . . . . 9 64 2.7. Specific Strategies . . . . . . . . . . . . . . . . . . . . 9 65 2.7.1. Subversion . . . . . . . . . . . . . . . . . . . . . . 9 66 2.7.2. Git . . . . . . . . . . . . . . . . . . . . . . . . . . 9 67 3. Registration Templates for Common Markdown Syntaxes . . . . . 10 68 3.1. MultiMarkdown . . . . . . . . . . . . . . . . . . . . . . . 10 69 3.2. GitHub Flavored Markdown . . . . . . . . . . . . . . . . . 11 70 3.3. Pandoc . . . . . . . . . . . . . . . . . . . . . . . . . . 11 71 3.4. Fountain (Fountain.io) . . . . . . . . . . . . . . . . . . 13 72 3.5. CommonMark . . . . . . . . . . . . . . . . . . . . . . . . 14 73 3.6. kramdown-rfc2629 (Markdown for RFCs) . . . . . . . . . . . 15 74 3.7. rfc7328 (Pandoc2rfc) . . . . . . . . . . . . . . . . . . . 15 75 3.8. PHP Markdown Extra . . . . . . . . . . . . . . . . . . . . 15 76 4. Examples for Common Markdown Syntaxes . . . . . . . . . . . . 16 77 4.1. MultiMarkdown . . . . . . . . . . . . . . . . . . . . . . . 16 78 4.2. GitHub Flavored Markdown . . . . . . . . . . . . . . . . . 16 79 4.3. Pandoc . . . . . . . . . . . . . . . . . . . . . . . . . . 17 80 4.4. Fountain (Fountain.io) . . . . . . . . . . . . . . . . . . 18 81 4.5. CommonMark . . . . . . . . . . . . . . . . . . . . . . . . 18 82 4.6. kramdown-rfc2629 (Markdown for RFCs) . . . . . . . . . . . 19 83 4.7. rfc7328 (Pandoc2rfc) . . . . . . . . . . . . . . . . . . . 22 84 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 85 6. Security Considerations . . . . . . . . . . . . . . . . . . . . 23 86 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 87 7.1. Normative References . . . . . . . . . . . . . . . . . . . 23 88 7.2. Informative References . . . . . . . . . . . . . . . . . . 23 89 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 25 91 1. Dive Into Markdown 93 This document serves as an informational companion to [MDMTREG], the 94 text/markdown media type registration. It should be considered 95 jointly with [MDMTREG]. 97 "Sometimes the truth of a thing is not so much in the 98 think of it, but in the feel of it." --Stanley Kubrick 100 1.1. On Formats 102 In computer systems, textual data is stored and processed using a 103 continuum of techniques. On the one end is plain text: computer- 104 encoded text that consists only of a sequence of code points from a 105 given standard, with no other formatting or structural information 106 [UNICODE]. Plain text provides /some/ fixed facilities for formatting 107 instructions, namely codes in the character set that have meanings 108 other than "represent this character graphically on the output 109 medium"; however, these facilities are not particularly extensible. 110 Compare with [RFC6838] Section 4.2.1. Applications may neuter the 111 effects of these special characters by prohibiting them or by 112 ignoring their dictated meanings, as is the case with how modern 113 applications treat most control characters in US-ASCII. On this end, 114 any text reader or editor that interprets the character set can be 115 used to see or manipulate the text. If some characters are corrupted, 116 the corruption is unlikely to affect the ability of a computer system 117 to process the text (even if the human meaning is changed). 119 On the other end is binary data: a sequence of bits intended for some 120 computer application to interpret and act upon. Binary formats are 121 flexible in that they can store non-textual data efficiently (perhaps 122 storing no text at all, or only storing certain kinds of text for 123 very specialized purposes). Binary formats require an application to 124 be coded specifically to handle the format; no partial 125 interoperability is possible. Furthermore, if even one bit is 126 corrupted in a binary format, it may prevent an application from 127 processing any of the data correctly. 129 Between these two extremes lies formatted text, i.e., text that 130 includes non-textual information coded in a particular way, that 131 affects the interpretation of the text by computer programs. 132 Formatted text is distinct from plain text and binary data in that 133 the non-textual information is encoded into textual characters, which 134 are assigned specialized meanings not defined by the character set. 135 With a regular text editor and a standard keyboard (or other standard 136 input mechanism), a user can enter these textual characters to 137 express the non-textual meanings. For example, a character like "<" 138 no longer means "LESS-THAN SIGN"; it means the start of a tag or 139 element that affects the document in some way. 141 On the formal end of the formatted text spectrum is markup, a family 142 of languages for annotating a document in such a way that the 143 annotations are syntactically distinguishable from the text. Markup 144 languages are (reasonably) well-specified and tend to follow (mostly) 145 standardized syntax rules. Examples of markup languages include SGML, 146 HTML, XML, and LaTeX. Standardized rules lead to interoperability 147 between markup processors, but a skill requirement for new (human) 148 users of the language that they learn these rules in order to do 149 useful work. This imposition makes markup less accessible for non- 150 technical users (i.e., users who are unwilling or unable to invest in 151 the requisite skill development). 153 informal /---------formatted text----------\ formal 154 <------v-------------v-------------v-----------------------v----> 155 plain text informal markup formal markup binary format 156 (Markdown) (HTML, XML, etc.) 158 Figure 1: Degrees of Formality in Data Storage Formats for Text 160 On the informal end of the spectrum are lightweight markup languages. 161 In comparison with formal markup like XML, lightweight markup uses 162 simple syntax, and is designed to be easy for humans to enter with 163 basic text editors. Markdown, the subject of this document, is an 164 /informal/ plain text formatting syntax that is intentionally 165 targeted at non-technical users (i.e., users upon whom little to no 166 skill development is imposed) using unspecialized tools (i.e., text 167 boxes). Jeff Atwood once described these informal markup languages as 168 "humane" [HUMANE]. 170 1.2. Markdown Design Philosophy 172 Markdown specifically is a family of syntaxes that are based on the 173 original work of John Gruber with substantial contributions from 174 Aaron Swartz, released in 2004 [MARKDOWN]. Since its release a number 175 of web or web-facing applications have incorporated Markdown into 176 their text entry systems, frequently with custom extensions. Fed up 177 with the complexity and security pitfalls of formal markup languages 178 (e.g., HTML5) and proprietary binary formats (e.g., commercial word 179 processing software), yet unwilling to be confined to the 180 restrictions of plain text, many users have turned to Markdown for 181 document processing. Whole toolchains now exist to support Markdown 182 for online and offline projects. 184 Informality is a bedrock premise of Gruber's design. Gruber created 185 Markdown after disastrous experiences with strict XML and XHTML 186 processing of syndicated feeds. In Mark Pilgrim's "thought 187 experiment", several websites went down because one site included 188 invalid XHTML in a blog post, which was automatically copied via 189 trackbacks across other sites [DIN2MD]. These scenarios led Gruber to 190 believe that clients (e.g., web browsers) SHOULD try to make sense of 191 data that they receive, rather than rejecting data simply because it 192 fails to adhere to strict, unforgiving standards. (In [DIN2MD], 193 Gruber compared Postel's Law [RFC0793] with the XML standard, which 194 says: "Once a fatal error is detected [...] the processor MUST NOT 195 continue normal processing" [XML1.0-5].) As a result, there is no 196 such thing as "invalid" Markdown; there is no standard demanding 197 adherence to the Markdown syntax; there is no governing body that 198 guides or impedes its development. If the Markdown syntax does not 199 result in the "right" output (defined as output that the author 200 wants, not output that adheres to some dictated system of rules), 201 Gruber's view is that the author either should keep on experimenting, 202 or should change the processor to address the author's particular 203 needs (see [MARKDOWN] Readme and [MD102b8] perldoc; see also 204 [CATPICS]). 206 1.3. Uses of Markdown 208 Since its introduction in 2004, Markdown has enjoyed remarkable 209 success. Markdown works for users for three key reasons. First, the 210 markup instructions (in text) look similar to the markup that they 211 represent; therefore the cognitive burden to learn the syntax is low. 212 Second, the primary arbiter of the syntax's success is *running 213 code*. The tool that converts the Markdown to a presentable format, 214 and not a series of formal pronouncements by a standards body, is the 215 basis for whether syntactic elements matter. Third, Markdown has 216 become something of an Internet meme [INETMEME], in that Markdown 217 gets received, reinterpreted, and reworked as additional communities 218 encounter it. There are communities that are using Markdown for 219 scholarly writing [OCCASION], for screenplays [FOUNTAIN], and even 220 for mathematical formulae [MATHDOWN]. Clearly, a screenwriter has no 221 use for specialized Markdown syntax for mathematicians; likewise, 222 mathematicians do not need to identify characters or props in common 223 ways. The overall gist is that all of these communities can take the 224 common elements of Markdown (which are rooted in the common elements 225 of HTML circa 2004) and build on them in ways that best fit their 226 needs. 228 1.4. Uses of Labeling Markdown Content as text/markdown 230 The primary purpose of an Internet media type is to label "content" 231 on the Internet, as distinct from "files". Content is any computer- 232 readable format that can be represented as a primary sequence of 233 octets, along with type-specific metadata (parameters) and type- 234 agnostic metadata (protocol dependent). From this description, it is 235 apparent that appending ".markdown" to the end of a filename is not a 236 sufficient means to identify Markdown. Filenames are properties of 237 files in file systems, but Markdown frequently exists in databases or 238 content management systems (CMSes) where the file metaphor does not 239 apply. One CMS [RAILFROG] uses media types to select appropriate 240 processing, so a media type is necessary for the safe and 241 interoperable use of Markdown. 243 Unlike complete HTML documents, [MDSYNTAX] provides no means to 244 include metadata into the content stream. Several derivative flavors 245 have invented metadata incorporation schemes (e.g., [MULTIMD]), but 246 these schemes only address specific use cases. In general, the 247 metadata must be supplied via supplementary means in an encapsulating 248 protocol, format, or convention. The relationship between the content 249 and the metadata is not directly addressed here or in [MDMTREG]; 250 however, by identifying Markdown with a media type, Markdown content 251 can participate as a first-class citizen with a wide spectrum of 252 metadata schemes. 254 Finally, registering a media type through the IETF process is not 255 trivial. Markdown can no longer be considered a "vendor"-specific 256 innovation, but the registration requirements even in the vendor tree 257 have proven to be overly burdensome for most Markdown implementers. 258 Moreover, registering hundreds of Markdown variants with distinct 259 media types would impede interoperability: virtually all Markdown 260 content can be processed by virtually any Markdown processor, with 261 varying degrees of success. The goal of [MDMTREG] is to reduce all of 262 these burdens by having one media type that accommodates diversity 263 and eases registration. 265 1.5. Definitions 267 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 268 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 269 document are to be interpreted as described in [RFC2119]. 271 Since Markdown signifies a family of related formats with varying 272 degrees of formal documentation and implementation, this 273 specification uses the term "variant" to identify such formats. 275 2. Strategies for Preserving Media Type and Parameters 277 The purpose of this document and [MDMTREG] is to promote 278 interoperability between different Markdown-related systems, 279 preserving the author's intent. While [MARKDOWN] was designed by 280 Gruber in 2004 as a simple way to write blog posts and comments, as 281 of 2014 Markdown and its derivatives are rapidly becoming the formats 282 of record for many communities and use cases. While an individual 283 member of (or software tool for) a community can probably look at 284 some "Markdown" and declare its meaning intuitively obvious, software 285 systems in different communities (or different times) need help. 286 [MDSYNTAX] does not have a signaling mechanism like , so 287 tagging Markdown internally is simply out of the question. Once tags 288 or metadata are introduced, the content is no longer "just" Markdown. 290 Some commentators have suggested that an in-band signaling mechanism, 291 such as in Markdown link definitions at the top of the content, could 292 be used to signal the variant. Unfortunately this signaling mechanism 293 is incompatible with other Markdown variants (e.g., [PANDOC]) that 294 expect their own kinds of metadata at the top of the file. Markdown 295 content is just a stream of text; the semantics of that text can only 296 be furnished by context. 298 The media type and variant parameter in [MDMTREG] furnish this 299 missing context, while allowing for additional extensibility. This 300 section covers strategies for how an application might preserve 301 metadata when it leaves the domain of IETF protocols. 303 [MDMTREG] only defines two parameters: the charset parameter 304 (required for all text/* media types) and the variant parameter. 305 [RFC6657] provides guidance on character set parameter handling. The 306 variant parameter provides a simple identifier--nothing less or more. 307 Variants are allowed to define additional parameters when sent with 308 the text/markdown media type; the variant can also introduce control 309 information into the textual content stream (such as via a metadata 310 block). Neither [MDMTREG] nor this specification recommend any 311 particular approach. However, the philosophy behind [MDMTREG] is to 312 preserve formats rather than create new ones, since supporting 313 existing toolchains is more realistic than creating novel ones that 314 lack traction in the Markdown community. 316 2.1. Map to Filename and Attributes 318 This strategy is to map the media type, variant, and parameters to 319 "attributes" or "forks" in the local convention. Firstly, Markdown 320 content saved to a file should have an appropriate file extension 321 ending in .md or .markdown, which serves to disambiguate it from 322 other kinds of files. The character repertoire of variant identifiers 323 in [MDMTREG] is designed to be compatible with most filename 324 conventions. Therefore, a recommended strategy is to record the 325 variant identifier as the prefix to the file extension. For example, 326 for [PANDOC] content, a file could be named 327 "example.pandoc.markdown". 329 Many filesystems are case-sensitive or case-preserving; however, file 330 extensions tend to be all-lowercase. This document takes no position 331 on whether variant identifiers should be case-preserved or all- 332 lowercase when Markdown content is written to a file. However, when 333 the variant identifier is read to influence operational behavior, it 334 needs to be compared case-insensitively. 336 Many modern filesystems support "extended attributes", "alternate 337 data streams", or "resource forks". Some version control systems 338 support named properties. If the variant defines additional 339 parameters, these parameters should be stored in these resources, 340 where the parameter name includes the name of the resource, and the 341 parameter value is the value of the resource (data in the resource), 342 preferably UTF-8 encoded (unless the parameter definition explicitly 343 defines a different encoding or repertoire). The variant identifier 344 itself should be stored in a resource with a name including the term 345 "variant" (possibly including other decorations to avoid namespace 346 collisions). 348 2.2. Store Headers in Adjacent File 350 This strategy is to save the Markdown content in a first file, and to 351 save the metadata (specifically the Content-Type: header) in a second 352 file with a filename that is rationally related to the first 353 filename. For example, if the first file is named "readme.markdown", 354 the second file could be named "readme.markdown.headers". (If stored 355 in a database, the analogy would be to store the metadata in a second 356 table with a field that is a key to the first table.) This header 357 file has the media type "message/global-headers" [RFC6533] (".u8hdr" 358 suggestion notwithstanding). 360 2.3. "Arm" Content with MIME Headers 362 This strategy is to save the Markdown content along with its headers 363 in a file, "arming" the content by prepending the MIME headers 364 (specifically the Content-Type: header). It should be appreciated 365 that the file is no longer a "Markdown file"; rather, it is an 366 Internet Message Format file (e.g., [RFC5322]) with a Markdown 367 content part. Therefore, the file should have an Internet message 368 extension (e.g., ".eml", ".msg", or ".u8msg"), not a Markdown 369 extension (e.g., ".md" or ".markdown"). 371 2.4. Create a Local Batch Script 373 This strategy is to translate the processing instructions inferred 374 from the Content-Type and other parameters (e.g., Content- 375 Disposition) into a sequence of commands in the local convention, 376 storing those commands in a batch script. For example, when a MIME- 377 aware client stores some Markdown to disk, the client can save a 378 Makefile in the same directory with commands that are appropriate 379 (and safe) for the local system. 381 2.5. Process the Markdown in Advance 383 This strategy is to process the Markdown into the formal markup, 384 before a recipient receives it, which eliminates ambiguities. Once 385 the Markdown is processed into (for example) valid XHTML, an 386 application can save a file as "doc.xhtml" or can send MIME content 387 as application/xhtml+xml with no further loss of metadata. While 388 unambiguous, this process may not be reversible. 390 2.6. Rely on Context 392 This last strategy is to use or create context to determine how to 393 interpret the Markdown. For example, Markdown content that is of the 394 Fountain.io type [FOUNTAIN] could be saved with the filename 395 "script.fountain" instead of "script.markdown". Alternatively, 396 scripts could be stored in a "/screenplays" directory while other 397 kinds of Markdown could be stored elsewhere. For reasons that should 398 be intuitively obvious, this method is the most error-prone. 399 "Context" can be easily lost over time, and the trend of passing 400 Markdown between systems--taking them *out* of context--is 401 increasing. 403 2.7. Specific Strategies 405 2.7.1. Subversion 407 This subsection covers a preservation strategy in Subversion [SVN], a 408 common client-server version control system. 410 Subversion supports named properties. The "svn:mime-type" property 411 duplicates the entire Content-Type header, so parameters SHOULD be 412 stored there (Section 2.1). The filename SHOULD be consistent with 413 this Content-Type header, i.e., the extension SHOULD be the variant 414 identifier plus ".markdown" (Section 2.1). 416 2.7.2. Git 418 This subsection covers a preservation strategy in Git [GIT], a common 419 distributed version control system. 421 Versions of Git as of the time of this writing do not support 422 arbitrary metadata storage; however, third-party projects add this 423 support. 425 If Git is used without a metadata storage service, then a reasonable 426 strategy is to include the variant identifier in the filename 427 (Section 2.1). The default text encoding SHOULD be UTF-8. For other 428 or different properties, a header file SHOULD be recorded alongside 429 the Markdown file (Section 2.2). 431 If a metadata storage service is used with Git, then use a convention 432 that is most analogous to the service. For example, the "metastore" 433 project emulates extended attributes (xattrs) of a POSIX-like system, 434 so whatever "xattr" methodology is developed would be usable with 435 metastore and Git. 437 3. Registration Templates for Common Markdown Syntaxes 439 The purpose of this section is to register certain syntaxes in the 440 Markdown Syntaxes Registry [MDMTREG] because they illustrate 441 particularly interesting use cases or are broadly applicable to the 442 Internet community; thus, these syntaxes would benefit from the level 443 of review associated with publication as IETF documents. 445 3.1. MultiMarkdown 447 Identifier: MultiMarkdown 449 Name: MultiMarkdown 451 Description: 452 MultiMarkdown (MMD) is a superset of "Original". It adds multiple 453 syntax features (tables, footnotes, and citations, to name a few), 454 and is intended to output to various formats. Additionally, it builds 455 in "smart" typography for various languages (proper left- and right- 456 sided quotes, for example). 458 Additional Parameters: 459 options: String with zero or more of the following WSP-delimited 460 tokens: 462 "memoir" / "beamer" 463 "full" / "snippet" 464 "process-html" 465 "random-footnote-identifiers" 466 "accept" 467 "reject" 468 "nosmart" 469 "nonotes" 470 "nolabels" 471 "nomask" 473 The meanings of these tokens are defined in the 474 MultiMarkdown documentation. 476 References: 478 480 Contact Information: 481 (individual) Fletcher T. Penney 482 484 3.2. GitHub Flavored Markdown 486 Identifier: GFM 488 Name: GitHub Flavored Markdown 490 Description: 491 "Original" with the following differences: 492 1. Multiple underscores in words 493 2. URL (URI) autolinking 494 3. Strikethrough 495 4. Fenced code blocks 496 5. Syntax highlighting 497 6. Tables (- for rows; | for columns; : for alignment) 498 7. Only some HTML allowed; sanitization is integral 499 to the format 501 References: 502 503 505 Contact Information: 506 (corporate) GitHub, Inc. 508 3.3. Pandoc 510 Identifier: pandoc 512 Name: Pandoc 514 Description: 515 Markdown is designed to be easy to write and to read: the content 516 should be publishable as-is, as plain text, without looking like it 517 has been marked up with tags or formatting instructions. Yet whereas 518 "Original" has HTML generation in mind, pandoc is designed for 519 multiple output formats. Thus, while pandoc allows the embedding of 520 raw HTML, it discourages it, and provides other, non-HTMLish ways of 521 representing important document elements like definition lists, 522 tables, mathematics, and footnotes. 524 Additional Parameters: 525 extensions: String with an optional starting syntax token, followed 526 by a "+" and "-" delimited list of extension tokens. "+" 527 preceding an extension token turns the extension on; "-" 528 turns the extension off. The starting syntax tokens are 529 "markdown", "markdown_strict", "markdown_phpextra", and 530 "markdown_github". If no starting syntax token is given, 531 "markdown" is assumed. The extension tokens include: 533 Extensions to turn off (on by default): 535 escaped_line_breaks 536 blank_before_header 537 header_attributes 538 auto_identifiers 539 implicit_header_references 540 blank_before_blockquote 541 fenced_code_blocks 542 fenced_code_attributes 543 line_blocks 544 fancy_lists 545 startnum 546 definition_lists 547 example_lists 548 table_captions 549 simple_tables 550 multiline_tables 551 grid_tables 552 pipe_tables 553 pandoc_title_block 554 yaml_metadata_block 555 all_symbols_escapable 556 intraword_underscores 557 strikeout 558 superscript 559 subscript 560 inline_code_attributes 561 tex_math_dollars 562 raw_html 563 markdown_in_html_blocks 564 native_divs 565 native_spans 566 raw_tex 567 latex_macros 568 implicit_figures 569 footnotes 570 inline_notes 571 citations 573 Extensions to turn on (off by default): 575 lists_without_preceding_blankline 576 hard_line_breaks 577 ignore_line_breaks 578 tex_math_single_backslash 579 tex_match_double_backslash 580 markdown_attribute 581 mmd_title_block 582 abbreviations 583 autolink_bare_uris 584 ascii_identifiers 585 link_attributes 586 mmd_header_identifiers 587 compact_definition_lists 589 Fragment Identifiers: 590 Pandoc defines fragment identifiers using the in the 591 {# .class ...} production (PHP Markdown Extra attribute block). 592 This syntax works for Header Identifiers and Code Block Identifiers. 594 References: 595 597 Contact Information: 598 (individual) Prof. John MacFarlane 599 601 3.4. Fountain (Fountain.io) 603 Identifier: Fountain 605 Name: Fountain 607 Description: 608 Fountain is a simple markup syntax for writing, editing and sharing 609 screenplays in plain, human-readable text. Fountain allows you to 610 work on your screenplay anywhere, on any computer or tablet, using 611 any software that edits text files. 613 Fragment Identifiers: 614 See and 615 . In the following 616 fragment identifiers, the and productions MUST have "/" 617 characters percent-encoded. 619 #/ Title Page (acts as metadata). 620 #/ Title Page; is the key string. 621 # *("/" ) 622 Section or subsection. The .. 623 productions are the text of the Section line, 624 with whitespace trimmed from both ends. 625 Sub-sections (sections with multiple # at 626 at the beginning of the line in the source) 627 are addressed hierarchically by preceding 628 the sub-section with higher-order 629 sections. If the section hierarchy "skips", 630 e.g., # to ###, use a blank section name, 631 e.g., #Section/ACT%20I//PATIO%20SCENE. 633 References: 634 636 Contact Information: 637 (individual) Stu Maschwitz 638 (individual) John August 640 3.5. CommonMark 642 Identifier: CommonMark 644 Name: CommonMark 646 Description: 647 CommonMark is a standard, unambiguous syntax specification for 648 Markdown, along with a suite of comprehensive tests to validate 649 Markdown implementations against this specification. The maintainers 650 believe that CommonMark is necessary, even essential, for the future 651 of Markdown. 653 Compared to "Original", CommonMark is much longer and in a few 654 instances contradicts "Original" based on seasoned experience. 655 Although CommonMark specifically does not mandate any particular 656 encoding for the input content, CommonMark draws in more of Unicode, 657 UTF-8, and HTML (including HTML5) than "Original". 659 This registration always refers to the latest version or an 660 unspecified version (receiver's choice). Version 0.13 of the 661 CommonMark specification was released 2014-12-10. 663 References: 664 666 Contact Information: 667 (individual) John MacFarlane 668 (individual) David Greenspan 669 (individual) Vicent Marti 670 (individual) Neil Williams 671 (individual) Benjamin Dumke-von der Ehe 672 (individual) Jeff Atwood 674 3.6. kramdown-rfc2629 (Markdown for RFCs) 676 Identifier: kramdown-rfc2629 678 Name: Markdown for RFCs 680 Description: 681 kramdown is a markdown parser by Thomas Leitner, which has a number 682 of backends for generating HTML, Latex, and Markdown again. kramdown- 683 rfc2629 is an additional backend to that: It allows the generation of 684 XML2RFC XML markup (also known as RFC 2629 compliant markup). 686 References: 687 689 Contact Information: 690 (individual) Carsten Bormann 692 3.7. rfc7328 (Pandoc2rfc) 694 Identifier: rfc7328 696 Name: Pandoc2rfc 698 Description: 699 Pandoc2rfc allows authors to write in "pandoc" that is then 700 transformed to XML and given to xml2rfc. The conversions are, in a 701 way, amusing, as we start off with (almost) plain text, use elaborate 702 XML, and end up with plain text again. 704 References: 705 RFC 7328 706 708 Contact Information: 709 (individual) R. (Miek) Gieben 711 3.8. PHP Markdown Extra 713 Identifier: Extra 715 Name: Markdown Extra 717 Description: 718 Markdown Extra is an extension to PHP Markdown implementing some 719 features currently not available with the plain Markdown syntax. 720 Markdown Extra is available as a separate parser class in PHP 721 Markdown Lib. Other implementations include Maruku (Ruby) and Python 722 Markdown. Markdown Extra is supported in several content management 723 systems, including Drupal, TYPO3, and MediaWiki. 725 Fragment Identifiers: 726 Markdown Extra defines fragment identifiers using the in the 727 {# .class ...} production (attribute block). This syntax works 728 for headers, fenced code blocks, links, and images. 730 References: 731 733 Contact Information: 734 (individual) Michel Fortin 736 4. Examples for Common Markdown Syntaxes 738 This section provides examples of the variants in Appendix C. 740 4.1. MultiMarkdown 742 Title: Example of MultiMarkdown 743 Keywords: IETF, example, footnotes 745 # MutliMarkdown Example # 747 MultiMarkdown supports several cool features, as well as 748 several output formats: 749 * HTML 750 * PDF 751 * OpenDocument 752 * OPML 753 * LaTeX 755 ## Footnotes ## 757 Footnotes are described in the 758 MultiMarkdown Syntax Guide.[^somesamplefootnote] 760 [^somesamplefootnote]: Here is the text of the footnote itself. 762 Figure 1: MultiMarkdown Example 764 4.2. GitHub Flavored Markdown 765 # Start Out # 767 GFM is like regular Markdown with a few extra features. For example, 768 http://www.example.com/ will get auto-linked. ~~Oops this is 769 some mistaken text, hence the strikethrough.~~ 771 ``` 772 function test() { 773 return "notice this feature?"); 774 } 775 ``` 777 # Table Alignments # 779 | Left | Center | Right | 780 |:--------- |:-------:| ------:| 781 | cats | Paxton | $1600 | 782 | dogs | Ruff | $30 | 783 | zebras | Stripes | $20900 | 785 Figure 2: GitHub Flavored Markdown Example 787 4.3. Pandoc 789 % Pandoc User's Guide 790 % John MacFarlane 791 % August 30, 2014 793 Synopsis {#syn} 794 ======== 796 pandoc [*options*] [*input-file*]... 798 Description {#desc} 799 =========== 801 Pandoc is a [Haskell] library for converting from one markup format to 802 another, and a command-line tool that uses this library. 804 #### Extension: `header_attributes` #### {#ext-header-attributes} 806 Headers can be assigned attributes using this syntax at the end 807 of the line containing the header text: 809 {#identifier .class .class key=value key=value} 811 Thus, for example, the following headers will all be assigned 812 the identifier `foo`: 814 # My header {#foo} 816 ## My header ## {#foo} 818 My other header {#foo} 819 --------------- 821 Figure 3: Pandoc Example 823 4.4. Fountain (Fountain.io) 825 INT. BOXCAR - MOVING - DAY 826 ?AGENT MORTIMER lies bleeding in the corner. The car ROCKS gently. 827 Mortimer pulls out his cell phone and dials. 829 MORTIMER? 830 Come on. Pick up. 832 CUT TO:? 833 ext. hotel bar - day? 834 A fiercely gorgeous brunette sips the last of something from a 835 rocks glass. This is REBECCA. 837 Behind her, a dark FIGURE approaches. She seems not to notice. 839 REBECCA?(to Bartender) 840 Ritenhouse, neat. 842 FIGURE (O.S.) ^ 843 Ritenhouse, neat. 845 She turns to find the source of the voice. 847 FIGURE 848 Excellent choice. 850 Before she can reply, her phone RINGS.? 852 > INTERCUT WITH:? 854 .THE BOXCAR 856 Where MORTIMER is just barely holding on to life. 858 Figure 4: Fountain Example 860 4.5. CommonMark 861 CommonMark is like Markdown. 863 Here are some entity names that you can use with CommonMark: `  864 & © Æ Ď ¾ ℋ ⅆ 865 ∲` 867 You can see more at [the CommonMark website](http://commonmark.org/ 868 "CommonMark"). 870 - foo 871 *** 872 - bar 874 Tildes can be used for fenced code blocks: 876 ~~~ 877 < 878 > 879 ~~~ 881 Figure 5: CommonMark Example 883 4.6. kramdown-rfc2629 (Markdown for RFCs) 885 --- 886 title: STUN/TURN using PHP in Despair 887 abbrev: STuPiD-excerpt 888 docname: draft-hartke-xmpp-stupid-excerpt-00 889 date: 2009-07-05 890 category: info 892 ipr: trust200902 893 area: General 894 workgroup: XMPP Working Group 895 keyword: Internet-Draft 897 stand_alone: yes 898 pi: [toc, sortrefs, symrefs] 900 author: 901 - 902 ins: K. Hartke 903 name: Klaus Hartke 904 email: example@tzi.org 906 normative: 907 RFC2119: 909 informative: 910 RFC5389: 911 STUNT: 912 target: http://www.example.com/oob 913 title: STUNT & out-of-band channels 914 author: 915 name: Robbie Hanson 916 ins: R. Hanson 917 date: 2007-09-17 919 --- abstract 921 NAT (Network Address Translator) Traversal may require TURN 922 (Traversal Using Relays around NAT) functionality in certain 923 cases that are not unlikely to occur. There is little 924 incentive to deploy TURN servers, except by those who need 925 them—who may not be in a position to deploy a new protocol 926 on an Internet-connected node, in particular not one with 927 deployment requirements as high as those of TURN. 929 --- middle 931 Introduction {#problems} 932 ============ 934 "STUN/TURN using PHP in Despair" is a highly deployable 935 protocol for obtaining TURN-like functionality, while also 936 providing the most important function of STUN 937 {{RFC5389}}. 939 The Need for Standardization {#need} 940 ---------------------------- 942 Having one standard form of STuPiD service instead of one 943 specific to each kind of client also creates an incentive 944 for optimized implementations. 946 ~~~~~~~~~~ 948 STuPiD ```````````````````````````````, 949 Script <----------------------------. , 950 | , 951 ^ , | , 952 | , | , 953 (1) | , | , (3) 954 POST | , | , GET 955 | , | , 956 | v | v 958 Peer A -----------------------> Peer B 959 (2) 960 out-of-band 961 Notification 962 ~~~~~~~~~~ 963 {: #figops title="STuPiD Protocol Operation"} 965 Terminology {#Terminology} 966 ----------- 967 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 968 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 969 and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119 970 {{RFC2119}} and indicate requirement levels for compliant STuPiD 971 implementations. 973 --- back 975 Sample Implementation {#impl} 976 ===================== 978 ~~~~~~~~~~ 979 985 ~~~~~~~~~~ 986 {: #figimpl title="STuPiD Sample Implementation"} 988 Figure 6: Markdown for RFCs Example 990 4.7. rfc7328 (Pandoc2rfc) 992 Pandoc2rfc expects multiple files as input. The following figure is 993 example of "middle.mkd". 995 # Introduction 997 998 999 1000 1001 1002 1004 This document presents a technique for using Pandoc syntax as a source 1005 format for documents in the Internet-Drafts (I-Ds) and Request 1006 for Comments (RFC) series. 1008 This version is adapted to work with `xml2rfc` version 2.x. 1010 Pandoc is an "almost plain text" format and therefore particularly 1011 well suited for editing RFC-like documents. 1013 > Note: this document is typeset in Pandoc. 1015 > NB: this is mostly text to test Pandoc2rfc, the canonical 1016 > documentation is [draft-gieben-pandoc2rfc][p2r]. 1018 [p2r]: http://tools.ietf.org/html/draft-gieben-pandoc2rfc-01 1020 # Pandoc to RFC 1022 > Pandoc2rfc -- designed to do the right thing, until it doesn't. 1024 When writing [](#RFC4641) we directly wrote the 1025 XML. Needless to say it was tedious even thought the XML of 1026 [xml2rfc](http://xml.resource.org/experimental) is very "light". 1027 The [latest version of xml2rfc version 2 can be found 1028 here](http://pypi.python.org/pypi/xml2rfc/). 1030 Figure 7: Pandoc2rfc Example (middle.mkd). 1032 5. IANA Considerations 1034 IANA is asked to register the syntaxes specified in Section 3 in the 1035 Markdown Variants Registry. 1037 6. Security Considerations 1039 See the respective syntax descriptions and output media type 1040 registrations for their respective security considerations. 1042 7. References 1044 7.1. Normative References 1046 [MARKDOWN] Gruber, J., "Daring Fireball: Markdown", December 2004, 1047 . 1049 [MDSYNTAX] Gruber, J., "Daring Fireball: Markdown Syntax 1050 Documentation", December 2004, 1051 . 1053 [MDMTREG] Leonard, S., "The text/markdown Media Type", draft-ietf- 1054 appsawg-text-markdown-11 (work in progress), September 1055 2015. 1057 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1058 Requirement Levels", BCP 14, RFC 2119, March 1997. 1060 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 1061 October 2008. 1063 [RFC6657] Melnikov, A. and J. Reschke, "Update to MIME regarding 1064 "charset" Parameter Handling in Textual Media Types", RFC 1065 6657, July 2012. 1067 7.2. Informative References 1069 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 1070 8.0.0", The Unicode Consortium, August 2015. 1072 [HUMANE] Atwood, J., "Is HTML a Humane Markup Language?", May 2008, 1073 . 1076 [DIN2MD] Gruber, J., "Dive Into Markdown", March 2004, 1077 . 1079 [MD102b8] Gruber, J., "[ANN] Markdown.pl 1.0.2b8", May 2007, 1080 , . 1084 [CATPICS] Gruber, J. and M. Arment, "The Talk Show: Ep. 88: 'Cat 1085 Pictures' (Side 1)", July 2014, 1086 . 1088 [INETMEME] Solon, O., "Richard Dawkins on the internet's hijacking of 1089 the word 'meme'", June 2013, 1090 , . 1093 [MULTIMD] Penney, F., "MultiMarkdown", April 2014, 1094 . 1096 [PANDOC] MacFarlane, J., "Pandoc", 2014, 1097 . 1099 [RAILFROG] Railfrog Team, "Railfrog", April 2009, 1100 . 1102 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 1103 793, September 1981. 1105 [RFC6533] Hansen, T., Ed., Newman, C. and A. Melnikov, 1106 "Internationalized Delivery Status and Disposition 1107 Notifications", RFC 6533, February 2012. 1109 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 1110 Specifications and Registration Procedures", BCP 13, RFC 1111 6838, January 2013. 1113 [XML1.0-5] Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and 1114 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fifth 1115 Edition)", World Wide Web Consortium Recommendation REC- 1116 xml-20081126, November 2008, 1117 . 1119 [OCCASION] Shieber, S., "Switching to Markdown for scholarly article 1120 production", August 2014, 1121 . 1124 [FOUNTAIN] Maschwitz, S. and J. August, "Fountain | A markup language 1125 for screenwriting.", 2014, . 1127 [MATHDOWN] Cherniavsky-Paskin, B., "math in markdown", 2015, 1128 . 1130 [SVN] Apache Subversion, August 2015, 1131 . 1133 [GIT] Git, July 2015, . 1135 Author's Address 1137 Sean Leonard 1138 Penango, Inc. 1139 5900 Wilshire Boulevard 1140 21st Floor 1141 Los Angeles, CA 90036 1142 USA 1144 EMail: dev+ietf@seantek.com 1145 URI: http://www.penango.com/