Markdown-2.6.9/0000755000076500000240000000000013145427672013743 5ustar waylanstaff00000000000000Markdown-2.6.9/bin/0000755000076500000240000000000013145427671014512 5ustar waylanstaff00000000000000Markdown-2.6.9/bin/markdown_py0000755000076500000240000000177113064117426016772 0ustar waylanstaff00000000000000#!/usr/bin/env python """ Python Markdown, the Command Line Script ======================================== This is the command line script for Python Markdown. Basic use from the command line: markdown source.txt > destination.html Run "markdown --help" to see more options. See markdown/__init__.py for information on using Python Markdown as a module. ## Authors and License Started by [Manfred Stienstra](http://www.dwerg.net/). Continued and maintained by [Yuri Takhteyev](http://www.freewisdom.org), [Waylan Limberg](http://achinghead.com/) and [Artem Yunusov](http://blog.splyer.com). Contact: markdown@freewisdom.org Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) Copyright 200? Django Software Foundation (OrderedDict implementation) Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) Copyright 2004 Manfred Stienstra (the original version) License: BSD (see docs/LICENSE for details). """ if __name__ == '__main__': from markdown.__main__ import run run() Markdown-2.6.9/docs/0000755000076500000240000000000013145427671014672 5ustar waylanstaff00000000000000Markdown-2.6.9/docs/_template.html0000644000076500000240000000476313145415574017543 0ustar waylanstaff00000000000000 %(page_title)s
%(body)s

Table Of Contents

%(toc)s

Previous topic

%(prev_title)s

Next topic

%(next_title)s

This Page

Markdown-2.6.9/docs/authors.txt0000644000076500000240000000326213064117426017115 0ustar waylanstaff00000000000000title: Authors prev_title: Release Notes for v2.0 prev_url: release-2.0.html next_title: Table of Contents next_url: siteindex.html Primary Authors =============== [Yuri Takteyev](http://freewisdom.org/) : Yuri has written much of the current code while procrastinating his Ph.D. [Waylan Limberg](http://achinghead.com/) : Waylan is the current maintainer of the code and has written much the current code base, included a complete refactor of the core. He started out by authoring many of the available extensions and later was asked to join Yuri, where he began fixing numerous bugs, adding documentation and making general improvements to the existing code base. Artem Yunusov : Artem, who as part of a 2008 GSoC project, refactored inline patterns, replaced the NanoDOM with ElementTree support and made various other improvements. [Manfed Stienstra](http://www.dwerg.net/) : Manfed wrote the original version of the script and is responsible for various parts of the existing code base. David Wolever : David refactored the extension API and made other improvements as he helped to integrate Markdown into Dr.Project. Other Contributors ================== The incomplete list of individuals below have provided patches or otherwise contributed to the project in various ways. We would like to thank everyone who has contributed to the project in any way. * Eric Abrahamsen * Jeff Balogh * Sergej Chodarev * Chris Clark * Tiago Cogumbreiro * Kjell Magne Fauske * G. Clark Haynes * Daniel Krech * Steward Midwinter * Jack Miller * Neale Pickett * Paul Stansifer * John Szakmeister * Malcolm Tredinnick * Ben Wilson * and many others who helped by reporting bugs Markdown-2.6.9/docs/basic.css0000644000076500000240000001536513064117426016471 0ustar waylanstaff00000000000000/** * Sphinx stylesheet -- basic theme * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } img { border: 0; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable td { text-align: left; vertical-align: top; } table.indextable dl, table.indextable dd { margin-top: 0; margin-bottom: 0; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } /* -- general body styles --------------------------------------------------- */ a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .field-list ul { padding-left: 1em; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table { border: 0 solid #dce; border-collapse: collapse; } table td, table th { padding: 2px 5px 2px 5px; } table td { border: 1px solid #ddd; background-color: #eef; } table td p.last, table th p.last { margin-bottom: 0; } table.field-list td, table.field-list th { border: 0 !important; } table.footnote td, table.footnote th { border: 0 !important; } table th { border: 1px solid #cac; background-color: #ede; } th { text-align: left; padding-right: 5px; } th.head { text-align: center; } /* -- other body styles ----------------------------------------------------- */ dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, .highlight { background-color: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .refcount { color: #060; } .optional { font-size: 1.3em; } .versionmodified { font-style: italic; } p.deprecated { background-color: #ffe4e4; border: 1px solid #f66; padding: 7px } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .impl-detail { margin-top: 10px; margin-bottom: 10px; padding: 7px; border: 1px solid #ccc; } .impl-detail .compound-first { margin-top: 0; } .impl-detail .compound-last { margin-bottom: 0; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; } code { font-size: 1.1em; } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } tt.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } tt.descclassname { background-color: transparent; } tt.xref, a tt { background-color: transparent; font-weight: bold; } h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { background-color: transparent; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } } Markdown-2.6.9/docs/change_log.txt0000644000076500000240000002036613145423307017520 0ustar waylanstaff00000000000000title: Change Log prev_title: Test Suite prev_url: test_suite.html next_title: Release Notes for v2.6 next_url: release-2.6.html Python-Markdown Change Log ========================= Aug 17, 2017: Released version 2.6.9 (a bug-fix release). Jan 25, 2017: Released version 2.6.8 (a bug-fix release). Sept 23, 2016: Released version 2.6.7 (a bug-fix release). Mar 20, 2016: Released version 2.6.6 (a bug-fix release). Nov 24, 2015: Released version 2.6.5 (a bug-fix release). Nov 6, 2015: Released version 2.6.4 (a bug-fix release). Oct 26, 2015: Released version 2.6.3 (a bug-fix release). Apr 20, 2015: Released version 2.6.2 (a bug-fix release). Mar 8, 2015: Released version 2.6.1 (a bug-fix release). The (new) `yaml` option has been removed from the Meta-Data Extension as it was buggy (see [#390](https://github.com/Python-Markdown/markdown/issues/390)). Feb 19, 2015: Released version 2.6 ([Notes](release-2.6.html)). Nov 19, 2014: Released version 2.5.2 (a bug-fix release). Sept 26, 2014: Released version 2.5.1 (a bug-fix release). Sept 12, 2014: Released version 2.5.0 ([Notes](release-2.5.html)). Feb 16, 2014: Released version 2.4.0 ([Notes](release-2.4.html)). Mar 22, 2013: Released version 2.3.1 (a bug-fix release). Mar 14, 2013: Released version 2.3.0 ([Notes](release-2.3.html)) Nov 4, 2012: Released version 2.2.1 ([Notes](release-2.2.1.html)). Jul 5, 2012: Released version 2.2.0 ([Notes](release-2.2.0.html)). Jan 22, 2012: Released version 2.1.1 ([Notes](release-2.1.1.html)). Nov 24, 2011: Released version 2.1.0 ([Notes](release-2.1.0.html)). Oct 7, 2009: Released version 2.0.3. Sept 28, 2009: Released version 2.0.2 ([Notes](release-2.0.2.html)). May 20, 2009: Released version 2.0.1 ([Notes](release-2.0.1.html)). Mar 30, 2009: Released version 2.0 ([Notes](release-2.0.html)). Mar 8, 2009: Release Candidate 2.0-rc-1. Feb 2009: Added support for multi-level lists to new Blockprocessors. Jan 2009: Added HTML 4 output as an option (thanks Eric Abrahamsen) Nov 2008: Added Definition List ext. Replaced old core with Blockprocessors. Broken up into multiple files. Oct 2008: Changed logging behavior to work better with other systems. Refactored tree traversing. Added `treap` implementation, then replaced with OrderedDict. Renamed various processors to better reflect what they actually do. Refactored footnote ext to match PHP Extra's output. Sept 2008: Moved `prettifyTree` to a Postprocessor, replaced WikiLink ext with WikiLinks (note the s) ext (uses bracketed links instead of CamelCase) and various bug fixes. August 18 2008: Reorganized directory structure. Added a 'docs' directory and moved all extensions into a 'markdown-extensions' package. Added additional documentation and a few bug fixes. (v2.0-beta) August 4 2008: Updated included extensions to ElementTree. Added a separate command line script. (v2.0-alpha) July 2008: Switched from home-grown NanoDOM to ElementTree and various related bugs (thanks Artem Yunusov). June 2008: Fixed issues with nested inline patterns and cleaned up testing framework (thanks Artem Yunusov). May 2008: Added a number of additional extensions to the distribution and other minor changes. Moved repository to git from svn. Mar 2008: Refactored extension API to accept either an extension name (as a string) or an instance of an extension (Thanks David Wolever). Fixed various bugs and added doc strings. Feb 2008: Various bug-fixes mostly regarding extensions. Feb 18, 2008: Version 1.7. Feb 13, 2008: A little code cleanup and better documentation and inheritance for Preprocessors/Postprocessors. Feb 9, 2008: Double-quotes no longer HTML escaped and raw HTML honors ``, `<@foo>`, and `<%foo>` for those who run markdown on template syntax. Dec 12, 2007: Updated docs. Removed encoding argument from Markdown and markdown as per list discussion. Clean up in prep for 1.7. Nov 29, 2007: Added support for images inside links. Also fixed a few bugs in the footnote extension. Nov 19, 2007: `message` now uses python's logging module. Also removed limit imposed by recursion in `_process_section()`. You can now parse as long of a document as your memory can handle. Nov 5, 2007: Moved `safe_mode` code to a `textPostprocessor` and added escaping option. Nov 3, 2007: Fixed convert method to accept empty strings. Oct 30, 2007: Fixed `BOM` removal (thanks Malcolm Tredinnick). Fixed infinite loop in bracket regular expression for inline links. Oct 11, 2007: `LineBreaks` is now an `inlinePattern`. Fixed `HR` in blockquotes. Refactored `_processSection` method (see tracker #1793419). Oct 9, 2007: Added `textPreprocessor` (from 1.6b). Oct 8, 2008: Fixed Lazy Blockquote. Fixed code block on first line. Fixed empty inline image link. Oct 7, 2007: Limit recursion on inline patterns. Added a 'safe' tag to `htmlStash`. March 18, 2007: Fixed or merged a bunch of minor bugs, including multi-line comments and markup inside links. (Tracker #s: 1683066, 1671153, 1661751, 1627935, 1544371, 1458139.) -> v. 1.6b Oct 10, 2006: Fixed a bug that caused some text to be lost after comments. Added "safe mode" (user's HTML tags are removed). Sept 6, 2006: Added exception for PHP tags when handling HTML blocks. August 7, 2006: Incorporated Sergej Chodarev's patch to fix a problem with ampersand normalization and HTML blocks. July 10, 2006: Switched to using `optparse`. Added proper support for Unicode. July 9, 2006: Fixed the `" % _escape_cdata(text)) elif tag is ProcessingInstruction: write("" % _escape_cdata(text)) else: tag = qnames[tag] if tag is None: if text: write(_escape_cdata(text)) for e in elem: _serialize_html(write, e, qnames, None, format) else: write("<" + tag) items = elem.items() if items or namespaces: items = sorted(items) # lexical order for k, v in items: if isinstance(k, QName): k = k.text if isinstance(v, QName): v = qnames[v.text] else: v = _escape_attrib_html(v) if qnames[k] == v and format == 'html': # handle boolean attributes write(" %s" % v) else: write(" %s=\"%s\"" % (qnames[k], v)) if namespaces: items = namespaces.items() items.sort(key=lambda x: x[1]) # sort on prefix for v, k in items: if k: k = ":" + k write(" xmlns%s=\"%s\"" % (k, _escape_attrib(v))) if format == "xhtml" and tag.lower() in HTML_EMPTY: write(" />") else: write(">") if text: if tag.lower() in ["script", "style"]: write(text) else: write(_escape_cdata(text)) for e in elem: _serialize_html(write, e, qnames, None, format) if tag.lower() not in HTML_EMPTY: write("") if elem.tail: write(_escape_cdata(elem.tail)) def _write_html(root, encoding=None, default_namespace=None, format="html"): assert root is not None data = [] write = data.append qnames, namespaces = _namespaces(root, default_namespace) _serialize_html(write, root, qnames, namespaces, format) if encoding is None: return "".join(data) else: return _encode("".join(data)) # -------------------------------------------------------------------- # serialization support def _namespaces(elem, default_namespace=None): # identify namespaces used in this tree # maps qnames to *encoded* prefix:local names qnames = {None: None} # maps uri:s to prefixes namespaces = {} if default_namespace: namespaces[default_namespace] = "" def add_qname(qname): # calculate serialized qname representation try: if qname[:1] == "{": uri, tag = qname[1:].split("}", 1) prefix = namespaces.get(uri) if prefix is None: prefix = _namespace_map.get(uri) if prefix is None: prefix = "ns%d" % len(namespaces) if prefix != "xml": namespaces[uri] = prefix if prefix: qnames[qname] = "%s:%s" % (prefix, tag) else: qnames[qname] = tag # default element else: if default_namespace: raise ValueError( "cannot use non-qualified names with " "default_namespace option" ) qnames[qname] = qname except TypeError: # pragma: no cover _raise_serialization_error(qname) # populate qname and namespaces table try: iterate = elem.iter except AttributeError: iterate = elem.getiterator # cET compatibility for elem in iterate(): tag = elem.tag if isinstance(tag, QName) and tag.text not in qnames: add_qname(tag.text) elif isinstance(tag, util.string_type): if tag not in qnames: add_qname(tag) elif tag is not None and tag is not Comment and tag is not PI: _raise_serialization_error(tag) for key, value in elem.items(): if isinstance(key, QName): key = key.text if key not in qnames: add_qname(key) if isinstance(value, QName) and value.text not in qnames: add_qname(value.text) text = elem.text if isinstance(text, QName) and text.text not in qnames: add_qname(text.text) return qnames, namespaces def to_html_string(element): return _write_html(ElementTree(element).getroot(), format="html") def to_xhtml_string(element): return _write_html(ElementTree(element).getroot(), format="xhtml") Markdown-2.6.9/markdown/treeprocessors.py0000644000076500000240000003135013064117426021214 0ustar waylanstaff00000000000000from __future__ import unicode_literals from __future__ import absolute_import from . import util from . import odict from . import inlinepatterns def build_treeprocessors(md_instance, **kwargs): """ Build the default treeprocessors for Markdown. """ treeprocessors = odict.OrderedDict() treeprocessors["inline"] = InlineProcessor(md_instance) treeprocessors["prettify"] = PrettifyTreeprocessor(md_instance) return treeprocessors def isString(s): """ Check if it's string """ if not isinstance(s, util.AtomicString): return isinstance(s, util.string_type) return False class Treeprocessor(util.Processor): """ Treeprocessors are run on the ElementTree object before serialization. Each Treeprocessor implements a "run" method that takes a pointer to an ElementTree, modifies it as necessary and returns an ElementTree object. Treeprocessors must extend markdown.Treeprocessor. """ def run(self, root): """ Subclasses of Treeprocessor should implement a `run` method, which takes a root ElementTree. This method can return another ElementTree object, and the existing root ElementTree will be replaced, or it can modify the current tree and return None. """ pass # pragma: no cover class InlineProcessor(Treeprocessor): """ A Treeprocessor that traverses a tree, applying inline patterns. """ def __init__(self, md): self.__placeholder_prefix = util.INLINE_PLACEHOLDER_PREFIX self.__placeholder_suffix = util.ETX self.__placeholder_length = 4 + len(self.__placeholder_prefix) \ + len(self.__placeholder_suffix) self.__placeholder_re = util.INLINE_PLACEHOLDER_RE self.markdown = md self.inlinePatterns = md.inlinePatterns def __makePlaceholder(self, type): """ Generate a placeholder """ id = "%04d" % len(self.stashed_nodes) hash = util.INLINE_PLACEHOLDER % id return hash, id def __findPlaceholder(self, data, index): """ Extract id from data string, start from index Keyword arguments: * data: string * index: index, from which we start search Returns: placeholder id and string index, after the found placeholder. """ m = self.__placeholder_re.search(data, index) if m: return m.group(1), m.end() else: return None, index + 1 def __stashNode(self, node, type): """ Add node to stash """ placeholder, id = self.__makePlaceholder(type) self.stashed_nodes[id] = node return placeholder def __handleInline(self, data, patternIndex=0): """ Process string with inline patterns and replace it with placeholders Keyword arguments: * data: A line of Markdown text * patternIndex: The index of the inlinePattern to start with Returns: String with placeholders. """ if not isinstance(data, util.AtomicString): startIndex = 0 while patternIndex < len(self.inlinePatterns): data, matched, startIndex = self.__applyPattern( self.inlinePatterns.value_for_index(patternIndex), data, patternIndex, startIndex) if not matched: patternIndex += 1 return data def __processElementText(self, node, subnode, isText=True): """ Process placeholders in Element.text or Element.tail of Elements popped from self.stashed_nodes. Keywords arguments: * node: parent node * subnode: processing node * isText: bool variable, True - it's text, False - it's tail Returns: None """ if isText: text = subnode.text subnode.text = None else: text = subnode.tail subnode.tail = None childResult = self.__processPlaceholders(text, subnode, isText) if not isText and node is not subnode: pos = list(node).index(subnode) + 1 else: pos = 0 childResult.reverse() for newChild in childResult: node.insert(pos, newChild) def __processPlaceholders(self, data, parent, isText=True): """ Process string with placeholders and generate ElementTree tree. Keyword arguments: * data: string with placeholders instead of ElementTree elements. * parent: Element, which contains processing inline data Returns: list with ElementTree elements with applied inline patterns. """ def linkText(text): if text: if result: if result[-1].tail: result[-1].tail += text else: result[-1].tail = text elif not isText: if parent.tail: parent.tail += text else: parent.tail = text else: if parent.text: parent.text += text else: parent.text = text result = [] strartIndex = 0 while data: index = data.find(self.__placeholder_prefix, strartIndex) if index != -1: id, phEndIndex = self.__findPlaceholder(data, index) if id in self.stashed_nodes: node = self.stashed_nodes.get(id) if index > 0: text = data[strartIndex:index] linkText(text) if not isString(node): # it's Element for child in [node] + list(node): if child.tail: if child.tail.strip(): self.__processElementText( node, child, False ) if child.text: if child.text.strip(): self.__processElementText(child, child) else: # it's just a string linkText(node) strartIndex = phEndIndex continue strartIndex = phEndIndex result.append(node) else: # wrong placeholder end = index + len(self.__placeholder_prefix) linkText(data[strartIndex:end]) strartIndex = end else: text = data[strartIndex:] if isinstance(data, util.AtomicString): # We don't want to loose the AtomicString text = util.AtomicString(text) linkText(text) data = "" return result def __applyPattern(self, pattern, data, patternIndex, startIndex=0): """ Check if the line fits the pattern, create the necessary elements, add it to stashed_nodes. Keyword arguments: * data: the text to be processed * pattern: the pattern to be checked * patternIndex: index of current pattern * startIndex: string index, from which we start searching Returns: String with placeholders instead of ElementTree elements. """ match = pattern.getCompiledRegExp().match(data[startIndex:]) leftData = data[:startIndex] if not match: return data, False, 0 node = pattern.handleMatch(match) if node is None: return data, True, len(leftData)+match.span(len(match.groups()))[0] if not isString(node): if not isinstance(node.text, util.AtomicString): # We need to process current node too for child in [node] + list(node): if not isString(node): if child.text: child.text = self.__handleInline( child.text, patternIndex + 1 ) if child.tail: child.tail = self.__handleInline( child.tail, patternIndex ) placeholder = self.__stashNode(node, pattern.type()) return "%s%s%s%s" % (leftData, match.group(1), placeholder, match.groups()[-1]), True, 0 def run(self, tree): """Apply inline patterns to a parsed Markdown tree. Iterate over ElementTree, find elements with inline tag, apply inline patterns and append newly created Elements to tree. If you don't want to process your data with inline paterns, instead of normal string, use subclass AtomicString: node.text = markdown.AtomicString("This will not be processed.") Arguments: * tree: ElementTree object, representing Markdown tree. Returns: ElementTree object with applied inline patterns. """ self.stashed_nodes = {} stack = [tree] while stack: currElement = stack.pop() insertQueue = [] for child in currElement: if child.text and not isinstance( child.text, util.AtomicString ): text = child.text child.text = None lst = self.__processPlaceholders( self.__handleInline(text), child ) stack += lst insertQueue.append((child, lst)) if child.tail: tail = self.__handleInline(child.tail) dumby = util.etree.Element('d') child.tail = None tailResult = self.__processPlaceholders(tail, dumby, False) if dumby.tail: child.tail = dumby.tail pos = list(currElement).index(child) + 1 tailResult.reverse() for newChild in tailResult: currElement.insert(pos, newChild) if len(child): stack.append(child) for element, lst in insertQueue: if self.markdown.enable_attributes: if element.text and isString(element.text): element.text = inlinepatterns.handleAttributes( element.text, element ) i = 0 for newChild in lst: if self.markdown.enable_attributes: # Processing attributes if newChild.tail and isString(newChild.tail): newChild.tail = inlinepatterns.handleAttributes( newChild.tail, element ) if newChild.text and isString(newChild.text): newChild.text = inlinepatterns.handleAttributes( newChild.text, newChild ) element.insert(i, newChild) i += 1 return tree class PrettifyTreeprocessor(Treeprocessor): """ Add linebreaks to the html document. """ def _prettifyETree(self, elem): """ Recursively add linebreaks to ElementTree children. """ i = "\n" if util.isBlockLevel(elem.tag) and elem.tag not in ['code', 'pre']: if (not elem.text or not elem.text.strip()) \ and len(elem) and util.isBlockLevel(elem[0].tag): elem.text = i for e in elem: if util.isBlockLevel(e.tag): self._prettifyETree(e) if not elem.tail or not elem.tail.strip(): elem.tail = i if not elem.tail or not elem.tail.strip(): elem.tail = i def run(self, root): """ Add linebreaks to ElementTree root object. """ self._prettifyETree(root) # Do
's seperately as they are often in the middle of # inline content and missed by _prettifyETree. brs = root.iter('br') for br in brs: if not br.tail or not br.tail.strip(): br.tail = '\n' else: br.tail = '\n%s' % br.tail # Clean up extra empty lines at end of code blocks. pres = root.iter('pre') for pre in pres: if len(pre) and pre[0].tag == 'code': pre[0].text = util.AtomicString(pre[0].text.rstrip() + '\n') Markdown-2.6.9/markdown/util.py0000644000076500000240000001301613064117426017106 0ustar waylanstaff00000000000000# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import sys """ Python 3 Stuff ============================================================================= """ PY3 = sys.version_info[0] == 3 if PY3: # pragma: no cover string_type = str text_type = str int2str = chr else: # pragma: no cover string_type = basestring # noqa text_type = unicode # noqa int2str = unichr # noqa """ Constants you might want to modify ----------------------------------------------------------------------------- """ BLOCK_LEVEL_ELEMENTS = re.compile( "^(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul" "|script|noscript|form|fieldset|iframe|math" "|hr|hr/|style|li|dt|dd|thead|tbody" "|tr|th|td|section|footer|header|group|figure" "|figcaption|aside|article|canvas|output" "|progress|video|nav|main)$", re.IGNORECASE ) # Placeholders STX = '\u0002' # Use STX ("Start of text") for start-of-placeholder ETX = '\u0003' # Use ETX ("End of text") for end-of-placeholder INLINE_PLACEHOLDER_PREFIX = STX+"klzzwxh:" INLINE_PLACEHOLDER = INLINE_PLACEHOLDER_PREFIX + "%s" + ETX INLINE_PLACEHOLDER_RE = re.compile(INLINE_PLACEHOLDER % r'([0-9]+)') AMP_SUBSTITUTE = STX+"amp"+ETX HTML_PLACEHOLDER = STX + "wzxhzdk:%s" + ETX HTML_PLACEHOLDER_RE = re.compile(HTML_PLACEHOLDER % r'([0-9]+)') TAG_PLACEHOLDER = STX + "hzzhzkh:%s" + ETX """ Constants you probably do not need to change ----------------------------------------------------------------------------- """ RTL_BIDI_RANGES = ( ('\u0590', '\u07FF'), # Hebrew (0590-05FF), Arabic (0600-06FF), # Syriac (0700-074F), Arabic supplement (0750-077F), # Thaana (0780-07BF), Nko (07C0-07FF). ('\u2D30', '\u2D7F') # Tifinagh ) # Extensions should use "markdown.util.etree" instead of "etree" (or do `from # markdown.util import etree`). Do not import it by yourself. try: # pragma: no cover # Is the C implementation of ElementTree available? import xml.etree.cElementTree as etree from xml.etree.ElementTree import Comment # Serializers (including ours) test with non-c Comment etree.test_comment = Comment if etree.VERSION < "1.0.5": raise RuntimeError("cElementTree version 1.0.5 or higher is required.") except (ImportError, RuntimeError): # pragma: no cover # Use the Python implementation of ElementTree? import xml.etree.ElementTree as etree if etree.VERSION < "1.1": raise RuntimeError("ElementTree version 1.1 or higher is required") """ AUXILIARY GLOBAL FUNCTIONS ============================================================================= """ def isBlockLevel(tag): """Check if the tag is a block level HTML tag.""" if isinstance(tag, string_type): return BLOCK_LEVEL_ELEMENTS.match(tag) # Some ElementTree tags are not strings, so return False. return False def parseBoolValue(value, fail_on_errors=True, preserve_none=False): """Parses a string representing bool value. If parsing was successful, returns True or False. If preserve_none=True, returns True, False, or None. If parsing was not successful, raises ValueError, or, if fail_on_errors=False, returns None.""" if not isinstance(value, string_type): if preserve_none and value is None: return value return bool(value) elif preserve_none and value.lower() == 'none': return None elif value.lower() in ('true', 'yes', 'y', 'on', '1'): return True elif value.lower() in ('false', 'no', 'n', 'off', '0', 'none'): return False elif fail_on_errors: raise ValueError('Cannot parse bool value: %r' % value) """ MISC AUXILIARY CLASSES ============================================================================= """ class AtomicString(text_type): """A string which should not be further processed.""" pass class Processor(object): def __init__(self, markdown_instance=None): if markdown_instance: self.markdown = markdown_instance class HtmlStash(object): """ This class is used for stashing HTML objects that we extract in the beginning and replace with place-holders. """ def __init__(self): """ Create a HtmlStash. """ self.html_counter = 0 # for counting inline html segments self.rawHtmlBlocks = [] self.tag_counter = 0 self.tag_data = [] # list of dictionaries in the order tags appear def store(self, html, safe=False): """ Saves an HTML segment for later reinsertion. Returns a placeholder string that needs to be inserted into the document. Keyword arguments: * html: an html segment * safe: label an html segment as safe for safemode Returns : a placeholder string """ self.rawHtmlBlocks.append((html, safe)) placeholder = self.get_placeholder(self.html_counter) self.html_counter += 1 return placeholder def reset(self): self.html_counter = 0 self.rawHtmlBlocks = [] def get_placeholder(self, key): return HTML_PLACEHOLDER % key def store_tag(self, tag, attrs, left_index, right_index): """Store tag data and return a placeholder.""" self.tag_data.append({'tag': tag, 'attrs': attrs, 'left_index': left_index, 'right_index': right_index}) placeholder = TAG_PLACEHOLDER % str(self.tag_counter) self.tag_counter += 1 # equal to the tag's index in self.tag_data return placeholder Markdown-2.6.9/PKG-INFO0000644000076500000240000000427613145427672015051 0ustar waylanstaff00000000000000Metadata-Version: 1.1 Name: Markdown Version: 2.6.9 Summary: Python implementation of Markdown. Home-page: https://pythonhosted.org/Markdown/ Author: Waylan Limberg Author-email: waylan.limberg@icloud.com License: BSD License Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.6.9.tar.gz Description: This is a Python implementation of John Gruber's Markdown_. It is almost completely compliant with the reference implementation, though there are a few known issues. See Features_ for information on what exactly is supported and what is not. Additional features are supported by the `Available Extensions`_. .. _Markdown: http://daringfireball.net/projects/markdown/ .. _Features: https://pythonhosted.org/Markdown/index.html#Features .. _`Available Extensions`: https://pythonhosted.org/Markdown/extensions/index.html Support ======= You may ask for help and discuss various other issues on the `mailing list`_ and report bugs on the `bug tracker`_. .. _`mailing list`: http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss .. _`bug tracker`: http://github.com/Python-Markdown/markdown/issues Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Topic :: Communications :: Email :: Filters Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries Classifier: Topic :: Internet :: WWW/HTTP :: Site Management Classifier: Topic :: Software Development :: Documentation Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Text Processing :: Filters Classifier: Topic :: Text Processing :: Markup :: HTML Markdown-2.6.9/README.md0000644000076500000240000000421213145420521015203 0ustar waylanstaff00000000000000[Python-Markdown][] =================== [![Build Status](http://img.shields.io/travis/Python-Markdown/markdown.svg)](https://travis-ci.org/Python-Markdown/markdown) [![Coverage Status](https://img.shields.io/coveralls/Python-Markdown/markdown.svg)](https://coveralls.io/r/Python-Markdown/markdown?branch=master) [![Latest Version](http://img.shields.io/pypi/v/Markdown.svg)](http://pypi.python.org/pypi/Markdown) [![Python Versions](http://img.shields.io/pypi/pyversions/Markdown.svg)](http://pypi.python.org/pypi/Markdown) [![BSD License](http://img.shields.io/badge/license-BSD-yellow.svg)](http://opensource.org/licenses/BSD-3-Clause) [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square)][Code of Conduct] This is a Python implementation of John Gruber's [Markdown][]. It is almost completely compliant with the reference implementation, though there are a few known issues. See [Features][] for information on what exactly is supported and what is not. Additional features are supported by the [Available Extensions][]. [Python-Markdown]: https://pythonhosted.org/Markdown/ [Markdown]: http://daringfireball.net/projects/markdown/ [Features]: https://pythonhosted.org/Markdown/index.html#Features [Available Extensions]: https://pythonhosted.org/Markdown/extensions/index.html Documentation ------------- Installation and usage documentation is available in the `docs/` directory of the distribution and on the project website at . See the change log at . Support ------- You may ask for help and discuss various other issues on the [mailing list][] and report bugs on the [bug tracker][]. [mailing list]: http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss [bug tracker]: http://github.com/Python-Markdown/markdown/issues Code of Conduct --------------- Everyone interacting in the Python-Markdown project's codebases, issue trackers, and mailing lists is expected to follow the [Code of Conduct]. [Code of Conduct]: https://github.com/Python-Markdown/markdown/blob/master/CODE_OF_CONDUCT.md Markdown-2.6.9/run-tests.py0000755000076500000240000000113513064117426016255 0ustar waylanstaff00000000000000#!/usr/bin/env python import tests import os import sys if len(sys.argv) > 1 and sys.argv[1] == "update": if len(sys.argv) > 2: config = tests.get_config(os.path.dirname(sys.argv[2])) root, ext = os.path.splitext(sys.argv[2]) if ext == config.get( config.get_section(os.path.basename(root)), 'input_ext' ): tests.generate(root, config) else: print( sys.argv[2], 'does not have a valid file extension. Check config.' ) else: tests.generate_all() else: tests.run() Markdown-2.6.9/setup.cfg0000644000076500000240000000001413064117426015550 0ustar waylanstaff00000000000000[nosetests] Markdown-2.6.9/setup.py0000755000076500000240000002321713145427647015467 0ustar waylanstaff00000000000000#!/usr/bin/env python from __future__ import with_statement import sys import os from distutils.core import setup from distutils.command.install_scripts import install_scripts from distutils.command.build import build from distutils.core import Command from distutils.util import change_root, newer import codecs import imp def get_version(): " Get version & version_info without importing markdown.__init__ " path = os.path.join(os.path.dirname(__file__), 'markdown') fp, pathname, desc = imp.find_module('__version__', [path]) try: v = imp.load_module('__version__', fp, pathname, desc) return v.version, v.version_info finally: fp.close() version, version_info = get_version() # Get development Status for classifiers dev_status_map = { 'alpha': '3 - Alpha', 'beta': '4 - Beta', 'rc': '4 - Beta', 'final': '5 - Production/Stable' } if version_info[3] == 'alpha' and version_info[4] == 0: DEVSTATUS = '2 - Pre-Alpha' else: DEVSTATUS = dev_status_map[version_info[3]] # The command line script name. Currently set to "markdown_py" so as not to # conflict with the perl implimentation (which uses "markdown"). We can't use # "markdown.py" as the default config on some systems will cause the script to # try to import itself rather than the library which will raise an error. SCRIPT_NAME = 'markdown_py' class md_install_scripts(install_scripts): """ Customized install_scripts. Create markdown_py.bat for win32. """ def run(self): install_scripts.run(self) if sys.platform == 'win32': try: script_dir = os.path.join(sys.prefix, 'Scripts') script_path = os.path.join(script_dir, SCRIPT_NAME) bat_str = '@"%s" "%s" %%*' % (sys.executable, script_path) bat_path = os.path.join( self.install_dir, '%s.bat' % SCRIPT_NAME ) f = open(bat_path, 'w') f.write(bat_str) f.close() print('Created: %s' % bat_path) except Exception: _, err, _ = sys.exc_info() # for both 2.x & 3.x compatability print('ERROR: Unable to create %s: %s' % (bat_path, err)) class build_docs(Command): """ Build markdown documentation into html.""" description = '"build" documentation (convert markdown text to html)' user_options = [ ('build-base=', 'd', 'directory to "build" to'), ('force', 'f', 'forcibly build everything (ignore file timestamps)'), ] boolean_options = ['force'] def initialize_options(self): self.build_base = None self.force = None self.docs = None self.sitemap = '' def finalize_options(self): self.set_undefined_options( 'build', ('build_base', 'build_base'), ('force', 'force') ) self.docs = self._get_docs() def _get_docs(self): for root, dirs, files in os.walk('docs'): for file in files: if not file.startswith('_'): path = os.path.join(root, file) yield path def _get_context(self, src, path): """ Build and return context to pass to template. """ # set defaults c = { 'title': '', 'prev_url': '', 'prev_title': '', 'next_url': '', 'next_title': '', 'crumb': '', 'version': version, } c['body'] = self.md.convert(src) c['toc'] = self.md.toc for k, v in self.md.Meta.items(): c[k] = ' '.join(v) self.md.reset() # Manipulate path path = path[len(os.path.join(self.build_base, 'docs/')):] dir, file = os.path.split(path) name, ext = os.path.splitext(file) parts = [x for x in dir.split(os.sep) if x] c['source'] = '%s.txt' % name c['base'] = '../' * len(parts) # Build page title if name.lower() != 'index' or parts: c['page_title'] = '%s — Python Markdown' % c['title'] else: c['page_title'] = 'Python Markdown' # Build crumb trail crumbs = [] ctemp = '
  • %s »
  • ' for n, part in enumerate(parts): href = ('../' * n) + 'index.html' label = part.replace('_', ' ').capitalize() crumbs.append(ctemp % (href, label)) if c['title'] and name.lower() != 'index': crumbs.append(ctemp % (file, c['title'])) c['crumb'] = '\n'.join(crumbs) return c def run(self): # Before importing markdown, tweak sys.path to import from the # build directory (2to3 might have run on the library). bld_cmd = self.get_finalized_command("build") sys.path.insert(0, bld_cmd.build_lib) try: import markdown except ImportError: print('skipping build_docs: Markdown "import" failed!') else: with codecs.open('docs/_template.html', encoding='utf-8') as f: template = f.read() self.md = markdown.Markdown( extensions=[ 'extra', 'toc(permalink=true)', 'meta', 'admonition', 'smarty' ] ) for infile in self.docs: outfile, ext = os.path.splitext(infile) if ext == '.txt': # Copy src to .txt file srcfile = outfile + '.txt' srcfile = change_root(self.build_base, srcfile) self.mkpath(os.path.split(srcfile)[0]) self.copy_file(infile, srcfile) # Render html file outfile += '.html' outfile = change_root(self.build_base, outfile) self.mkpath(os.path.split(outfile)[0]) if self.force or newer(infile, outfile): if self.verbose: print('Converting %s -> %s' % (infile, outfile)) if not self.dry_run: with codecs.open(infile, encoding='utf-8') as f: src = f.read() out = template % self._get_context(src, outfile) doc = open(outfile, 'wb') doc.write(out.encode('utf-8')) doc.close() else: outfile = change_root(self.build_base, infile) self.mkpath(os.path.split(outfile)[0]) self.copy_file(infile, outfile) class md_build(build): """ Run "build_docs" command from "build" command. """ user_options = build.user_options + [ ('no-build-docs', None, 'do not build documentation'), ] boolean_options = build.boolean_options + ['build-docs'] def initialize_options(self): build.initialize_options(self) self.no_build_docs = False def has_docs(self): return not self.no_build_docs sub_commands = build.sub_commands + [('build_docs', has_docs)] long_description = ''' This is a Python implementation of John Gruber's Markdown_. It is almost completely compliant with the reference implementation, though there are a few known issues. See Features_ for information on what exactly is supported and what is not. Additional features are supported by the `Available Extensions`_. .. _Markdown: http://daringfireball.net/projects/markdown/ .. _Features: https://pythonhosted.org/Markdown/index.html#Features .. _`Available Extensions`: https://pythonhosted.org/Markdown/extensions/index.html Support ======= You may ask for help and discuss various other issues on the `mailing list`_ and report bugs on the `bug tracker`_. .. _`mailing list`: http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss .. _`bug tracker`: http://github.com/Python-Markdown/markdown/issues ''' setup( name='Markdown', version=version, url='https://pythonhosted.org/Markdown/', download_url='http://pypi.python.org/packages/source/M/Markdown/Markdown-%s.tar.gz' % version, description='Python implementation of Markdown.', long_description=long_description, author='Manfred Stienstra, Yuri takhteyev and Waylan limberg', author_email='waylan.limberg@icloud.com', maintainer='Waylan Limberg', maintainer_email='waylan.limberg@icloud.com', license='BSD License', packages=['markdown', 'markdown.extensions'], scripts=['bin/%s' % SCRIPT_NAME], cmdclass={ 'install_scripts': md_install_scripts, 'build_docs': build_docs, 'build': md_build }, classifiers=[ 'Development Status :: %s' % DEVSTATUS, 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Communications :: Email :: Filters', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Software Development :: Documentation', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: Filters', 'Topic :: Text Processing :: Markup :: HTML' ] ) Markdown-2.6.9/tests/0000755000076500000240000000000013145427671015104 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/__init__.py0000644000076500000240000001460313064117426017213 0ustar waylanstaff00000000000000import os import markdown import codecs import difflib try: import nose except ImportError as e: msg = e.args[0] msg = msg + ". The nose testing framework is required to run the Python-" \ "Markdown tests. Run `pip install nose` to install the latest version." e.args = (msg,) + e.args[1:] raise from .plugins import HtmlOutput, Markdown, MarkdownSyntaxError try: import tidylib except ImportError: tidylib = None try: import yaml except ImportError as e: msg = e.args[0] msg = msg + ". A YAML library is required to run the Python-Markdown " \ "tests. Run `pip install pyyaml` to install the latest version." e.args = (msg,) + e.args[1:] raise test_dir = os.path.abspath(os.path.dirname(__file__)) class YamlConfig(): def __init__(self, defaults, filename): """ Set defaults and load config file if it exists. """ self.DEFAULT_SECTION = 'DEFAULT' self._defaults = defaults self._config = {} if os.path.exists(filename): with codecs.open(filename, encoding="utf-8") as f: self._config = yaml.load(f) def get(self, section, option): """ Get config value for given section and option key. """ if section in self._config and option in self._config[section]: return self._config[section][option] return self._defaults[option] def get_section(self, file): """ Get name of config section for given file. """ filename = os.path.basename(file) if filename in self._config: return filename else: return self.DEFAULT_SECTION def get_args(self, file): """ Get args to pass to markdown from config for a given file. """ args = {} section = self.get_section(file) if section in self._config: for key in self._config[section].keys(): # Filter out args unique to testing framework if key not in self._defaults.keys(): args[key] = self.get(section, key) return args def get_config(dir_name): """ Get config for given directory name. """ defaults = { 'normalize': False, 'skip': False, 'input_ext': '.txt', 'output_ext': '.html' } config = YamlConfig(defaults, os.path.join(dir_name, 'test.cfg')) return config def normalize(text): """ Normalize whitespace for a string of html using tidylib. """ output, errors = tidylib.tidy_fragment(text, options={ 'drop_empty_paras': 0, 'fix_backslash': 0, 'fix_bad_comments': 0, 'fix_uri': 0, 'join_styles': 0, 'lower_literals': 0, 'merge_divs': 0, 'output_xhtml': 1, 'quote_ampersand': 0, 'newline': 'LF' }) return output class CheckSyntax(object): def __init__(self, description=None): if description: self.description = 'TestSyntax: "%s"' % description def __call__(self, file, config): """ Compare expected output to actual output and report result. """ cfg_section = config.get_section(file) if config.get(cfg_section, 'skip'): raise nose.plugins.skip.SkipTest('Test skipped per config.') input_file = file + config.get(cfg_section, 'input_ext') with codecs.open(input_file, encoding="utf-8") as f: input = f.read() output_file = file + config.get(cfg_section, 'output_ext') with codecs.open(output_file, encoding="utf-8") as f: # Normalize line endings # (on windows, git may have altered line endings). expected_output = f.read().replace("\r\n", "\n") output = markdown.markdown(input, **config.get_args(file)) if tidylib and config.get(cfg_section, 'normalize'): # Normalize whitespace with tidylib before comparing. expected_output = normalize(expected_output) output = normalize(output) elif config.get(cfg_section, 'normalize'): # Tidylib is not available. Skip this test. raise nose.plugins.skip.SkipTest( 'Test skipped. Tidylib not available on system.' ) diff = [l for l in difflib.unified_diff( expected_output.splitlines(True), output.splitlines(True), output_file, 'actual_output.html', n=3 )] if diff: raise MarkdownSyntaxError( 'Output from "%s" failed to match expected ' 'output.\n\n%s' % (input_file, ''.join(diff)) ) def TestSyntax(): for dir_name, sub_dirs, files in os.walk(test_dir): # Get dir specific config settings. config = get_config(dir_name) # Loop through files and generate tests. for file in files: root, ext = os.path.splitext(file) if ext == config.get(config.get_section(file), 'input_ext'): path = os.path.join(dir_name, root) check_syntax = CheckSyntax( description=os.path.relpath(path, test_dir) ) yield check_syntax, path, config def generate(file, config): """ Write expected output file for given input. """ cfg_section = config.get_section(file) if config.get(cfg_section, 'skip') or config.get(cfg_section, 'normalize'): print('Skipping:', file) return None input_file = file + config.get(cfg_section, 'input_ext') output_file = file + config.get(cfg_section, 'output_ext') if not os.path.isfile(output_file) or \ os.path.getmtime(output_file) < os.path.getmtime(input_file): print('Generating:', file) markdown.markdownFromFile(input=input_file, output=output_file, encoding='utf-8', **config.get_args(file)) else: print('Already up-to-date:', file) def generate_all(): """ Generate expected output for all outdated tests. """ for dir_name, sub_dirs, files in os.walk(test_dir): # Get dir specific config settings. config = get_config(dir_name) # Loop through files and generate tests. for file in files: root, ext = os.path.splitext(file) if ext == config.get(config.get_section(file), 'input_ext'): generate(os.path.join(dir_name, root), config) def run(): nose.main(addplugins=[HtmlOutput(), Markdown()]) Markdown-2.6.9/tests/basic/0000755000076500000240000000000013145427671016165 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/basic/amps-and-angle-encoding.html0000644000076500000240000000076313064117426023423 0ustar waylanstaff00000000000000

    AT&T has an ampersand in their name.

    AT&T is another way to write it.

    This & that.

    4 < 5.

    6 > 5.

    Here's a link with an ampersand in the URL.

    Here's a link with an amersand in the link text: AT&T.

    Here's an inline link.

    Here's an inline link.

    Markdown-2.6.9/tests/basic/amps-and-angle-encoding.txt0000644000076500000240000000057513064117426023277 0ustar waylanstaff00000000000000AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 < 5. 6 > 5. Here's a [link] [1] with an ampersand in the URL. Here's a link with an amersand in the link text: [AT&T] [2]. Here's an inline [link](/script?foo=1&bar=2). Here's an inline [link](). [1]: http://example.com/?foo=1&bar=2 [2]: http://att.com/ "AT&T"Markdown-2.6.9/tests/basic/angle-links-and-img.html0000644000076500000240000000030313064117426022557 0ustar waylanstaff00000000000000

    link image link image

    Markdown-2.6.9/tests/basic/angle-links-and-img.txt0000644000076500000240000000021113064117426022430 0ustar waylanstaff00000000000000[link]( "title") ![image]() [link]() ![image]() Markdown-2.6.9/tests/basic/auto-links.html0000644000076500000240000000124613064117426021136 0ustar waylanstaff00000000000000

    Link: http://example.com/.

    Https link: https://example.com

    Ftp link: ftp://example.com

    With an ampersand: http://example.com/?foo=1&bar=2

    Blockquoted: http://example.com/

    Auto-links should not occur here: <http://example.com/>

    or here: <http://example.com/>
    
    Markdown-2.6.9/tests/basic/auto-links.txt0000644000076500000240000000051213064117426021004 0ustar waylanstaff00000000000000Link: . Https link: Ftp link: With an ampersand: * In a list? * * It should. > Blockquoted: Auto-links should not occur here: `` or here: Markdown-2.6.9/tests/basic/backlash-escapes.html0000644000076500000240000000236213064117426022241 0ustar waylanstaff00000000000000

    These should all get escaped:

    Backslash: \

    Backtick: `

    Asterisk: *

    Underscore: _

    Left brace: {

    Right brace: }

    Left bracket: [

    Right bracket: ]

    Left paren: (

    Right paren: )

    Greater-than: >

    Hash: #

    Period: .

    Bang: !

    Plus: +

    Minus: -

    These should not, because they occur within a code block:

    Backslash: \\
    
    Backtick: \`
    
    Asterisk: \*
    
    Underscore: \_
    
    Left brace: \{
    
    Right brace: \}
    
    Left bracket: \[
    
    Right bracket: \]
    
    Left paren: \(
    
    Right paren: \)
    
    Greater-than: \>
    
    Hash: \#
    
    Period: \.
    
    Bang: \!
    
    Plus: \+
    
    Minus: \-
    

    Nor should these, which occur in code spans:

    Backslash: \\

    Backtick: \`

    Asterisk: \*

    Underscore: \_

    Left brace: \{

    Right brace: \}

    Left bracket: \[

    Right bracket: \]

    Left paren: \(

    Right paren: \)

    Greater-than: \>

    Hash: \#

    Period: \.

    Bang: \!

    Plus: \+

    Minus: \-

    Markdown-2.6.9/tests/basic/backlash-escapes.txt0000644000076500000240000000157113064117426022115 0ustar waylanstaff00000000000000These should all get escaped: Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: \{ Right brace: \} Left bracket: \[ Right bracket: \] Left paren: \( Right paren: \) Greater-than: \> Hash: \# Period: \. Bang: \! Plus: \+ Minus: \- These should not, because they occur within a code block: Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: \{ Right brace: \} Left bracket: \[ Right bracket: \] Left paren: \( Right paren: \) Greater-than: \> Hash: \# Period: \. Bang: \! Plus: \+ Minus: \- Nor should these, which occur in code spans: Backslash: `\\` Backtick: `` \` `` Asterisk: `\*` Underscore: `\_` Left brace: `\{` Right brace: `\}` Left bracket: `\[` Right bracket: `\]` Left paren: `\(` Right paren: `\)` Greater-than: `\>` Hash: `\#` Period: `\.` Bang: `\!` Plus: `\+` Minus: `\-` Markdown-2.6.9/tests/basic/blockquotes-with-code-blocks.html0000644000076500000240000000026013064117426024532 0ustar waylanstaff00000000000000

    Example:

    sub status {
        print "working";
    }
    

    Or:

    sub status {
        return "working";
    }
    
    Markdown-2.6.9/tests/basic/blockquotes-with-code-blocks.txt0000644000076500000240000000020713064117426024406 0ustar waylanstaff00000000000000> Example: > > sub status { > print "working"; > } > > Or: > > sub status { > return "working"; > } Markdown-2.6.9/tests/basic/codeblock-in-list.html0000644000076500000240000000026513064117426022352 0ustar waylanstaff00000000000000
    • A list item with a code block

      Some *code*
      
    • Another list item

      More code
      
      And more code
      
    Markdown-2.6.9/tests/basic/codeblock-in-list.txt0000644000076500000240000000016513064117426022224 0ustar waylanstaff00000000000000* A list item with a code block Some *code* * Another list item More code And more code Markdown-2.6.9/tests/basic/hard-wrapped.html0000644000076500000240000000032113064117426021417 0ustar waylanstaff00000000000000

    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

    Here's one with a bullet. * criminey.

    Markdown-2.6.9/tests/basic/hard-wrapped.txt0000644000076500000240000000030513064117426021274 0ustar waylanstaff00000000000000In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. * criminey. Markdown-2.6.9/tests/basic/horizontal-rules.html0000644000076500000240000000062013064117426022364 0ustar waylanstaff00000000000000

    Dashes:





    ---
    




    - - -
    

    Asterisks:





    ***
    




    * * *
    

    Underscores:





    ___
    




    _ _ _
    
    Markdown-2.6.9/tests/basic/horizontal-rules.txt0000644000076500000240000000041613064117426022242 0ustar waylanstaff00000000000000Dashes: --- --- --- --- --- - - - - - - - - - - - - - - - Asterisks: *** *** *** *** *** * * * * * * * * * * * * * * * Underscores: ___ ___ ___ ___ ___ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Markdown-2.6.9/tests/basic/inline-html-advanced.html0000644000076500000240000000022113064117426023023 0ustar waylanstaff00000000000000

    Simple block on one line:

    foo

    And nested without indentation:

    foo
    bar
    Markdown-2.6.9/tests/basic/inline-html-advanced.txt0000644000076500000240000000020613064117426022701 0ustar waylanstaff00000000000000Simple block on one line:
    foo
    And nested without indentation:
    foo
    bar
    Markdown-2.6.9/tests/basic/inline-html-comments.html0000644000076500000240000000027113064117426023110 0ustar waylanstaff00000000000000

    Paragraph one.

    Paragraph two.

    The end.

    Markdown-2.6.9/tests/basic/inline-html-comments.txt0000644000076500000240000000024413064117426022763 0ustar waylanstaff00000000000000Paragraph one. Paragraph two. The end. Markdown-2.6.9/tests/basic/inline-html-simple.html0000644000076500000240000000155213064117426022557 0ustar waylanstaff00000000000000

    Here's a simple block:

    foo

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    foo

    This should just be an HTML comment:

    Multiline:

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    Code:

    <hr />
    

    Hr's:










    weird stuff>

    > <> <

    Markdown-2.6.9/tests/basic/inline-html-simple.txt0000644000076500000240000000116513064117426022432 0ustar waylanstaff00000000000000Here's a simple block:
    foo
    This should be a code block, though:
    foo
    As should this:
    foo
    Now, nested:
    foo
    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
    Hr's:








    > <> <Markdown-2.6.9/tests/basic/links-inline.html0000644000076500000240000000042413064117426021441 0ustar waylanstaff00000000000000

    Just a URL.

    URL and title.

    URL and title.

    URL and title.

    Empty.

    Markdown-2.6.9/tests/basic/links-inline.txt0000644000076500000240000000025613064117426021317 0ustar waylanstaff00000000000000Just a [URL](/url/). [URL and title](/url/ "title"). [URL and title](/url/ "title preceded by two spaces"). [URL and title](/url/ "title preceded by a tab"). [Empty](). Markdown-2.6.9/tests/basic/links-reference.html0000644000076500000240000000202713064117426022122 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Foo bar.

    With embedded [brackets].

    Indented once.

    Indented twice.

    Indented thrice.

    Indented [four][] times.

    [four]: /url
    

    With angle brackets.

    And without.

    With line breaks

    and line breaks with one space.

    and [line
    breaks[] with two spaces.

    short ref

    short ref

    a ref

    Markdown-2.6.9/tests/basic/links-reference.txt0000644000076500000240000000134413064117426021776 0ustar waylanstaff00000000000000Foo [bar] [1]. Foo [bar][1]. Foo [bar] [1]. [1]: /url/ "Title" With [embedded [brackets]] [b]. Indented [once][]. Indented [twice][]. Indented [thrice][]. Indented [four][] times. [once]: /url [twice]: /url [thrice]: /url [four]: /url [b]: /url/ With [angle brackets][]. And [without][]. [angle brackets]: "Angle Brackets" [without]: http://example.com/ "Without angle brackets." With [line breaks][] and [line breaks][] with one space. and [line breaks[] with two spaces. [line breaks]: http://example.com "Yes this works" [short ref] [short ref] [short ref]: http://example.com "No more hanging empty bracket!" [a ref] [a ref]: http://example.com "Title on next line." Markdown-2.6.9/tests/basic/literal-quotes.html0000644000076500000240000000024113064117426022014 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Markdown-2.6.9/tests/basic/literal-quotes.txt0000644000076500000240000000015413064117426021672 0ustar waylanstaff00000000000000Foo [bar][]. Foo [bar](/url/ "Title with "quotes" inside"). [bar]: /url/ "Title with "quotes" inside" Markdown-2.6.9/tests/basic/markdown-documentation-basics.html0000644000076500000240000002214013064117426024777 0ustar waylanstaff00000000000000

    Markdown: Basics

    Getting the Gist of Markdown's Formatting Syntax

    This page offers a brief overview of what it's like to use Markdown. The syntax page provides complete, detailed documentation for every feature, but Markdown should be very easy to pick up simply by looking at a few examples of it in action. The examples on this page are written in a before/after style, showing example syntax and the HTML output produced by Markdown.

    It's also helpful to simply try Markdown out; the Dingus is a web application that allows you type your own Markdown-formatted text and translate it to XHTML.

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.

    Paragraphs, Headers, Blockquotes

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    Markdown offers two styles of headers: Setext and atx. Setext-style headers for <h1> and <h2> are created by "underlining" with equal signs (=) and hyphens (-), respectively. To create an atx-style header, you put 1-6 hash marks (#) at the beginning of the line -- the number of hashes equals the resulting HTML header level.

    Blockquotes are indicated using email-style '>' angle brackets.

    Markdown:

    A First Level Header
    ====================
    
    A Second Level Header
    ---------------------
    
    Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.
    
    The quick brown fox jumped over the lazy
    dog's back.
    
    ### Header 3
    
    > This is a blockquote.
    > 
    > This is the second paragraph in the blockquote.
    >
    > ## This is an H2 in a blockquote
    

    Output:

    <h1>A First Level Header</h1>
    
    <h2>A Second Level Header</h2>
    
    <p>Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.</p>
    
    <p>The quick brown fox jumped over the lazy
    dog's back.</p>
    
    <h3>Header 3</h3>
    
    <blockquote>
        <p>This is a blockquote.</p>
    
        <p>This is the second paragraph in the blockquote.</p>
    
        <h2>This is an H2 in a blockquote</h2>
    </blockquote>
    

    Phrase Emphasis

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    Markdown:

    Some of these words *are emphasized*.
    Some of these words _are emphasized also_.
    
    Use two asterisks for **strong emphasis**.
    Or, if you prefer, __use two underscores instead__.
    

    Output:

    <p>Some of these words <em>are emphasized</em>.
    Some of these words <em>are emphasized also</em>.</p>
    
    <p>Use two asterisks for <strong>strong emphasis</strong>.
    Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    

    Lists

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, +, and -) as list markers. These three markers are interchangable; this:

    *   Candy.
    *   Gum.
    *   Booze.
    

    this:

    +   Candy.
    +   Gum.
    +   Booze.
    

    and this:

    -   Candy.
    -   Gum.
    -   Booze.
    

    all produce the same output:

    <ul>
    <li>Candy.</li>
    <li>Gum.</li>
    <li>Booze.</li>
    </ul>
    

    Ordered (numbered) lists use regular numbers, followed by periods, as list markers:

    1.  Red
    2.  Green
    3.  Blue
    

    Output:

    <ol>
    <li>Red</li>
    <li>Green</li>
    <li>Blue</li>
    </ol>
    

    If you put blank lines between items, you'll get <p> tags for the list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab:

    *   A list item.
    
        With multiple paragraphs.
    
    *   Another item in the list.
    

    Output:

    <ul>
    <li><p>A list item.</p>
    <p>With multiple paragraphs.</p></li>
    <li><p>Another item in the list.</p></li>
    </ul>
    

    Links

    Markdown supports two styles for creating links: inline and reference. With both styles, you use square brackets to delimit the text you want to turn into a link.

    Inline-style links use parentheses immediately after the link text. For example:

    This is an [example link](http://example.com/).
    

    Output:

    <p>This is an <a href="http://example.com/">
    example link</a>.</p>
    

    Optionally, you may include a title attribute in the parentheses:

    This is an [example link](http://example.com/ "With a Title").
    

    Output:

    <p>This is an <a href="http://example.com/" title="With a Title">
    example link</a>.</p>
    

    Reference-style links allow you to refer to your links by names, which you define elsewhere in your document:

    I get 10 times more traffic from [Google][1] than from
    [Yahoo][2] or [MSN][3].
    
    [1]: http://google.com/        "Google"
    [2]: http://search.yahoo.com/  "Yahoo Search"
    [3]: http://search.msn.com/    "MSN Search"
    

    Output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    title="MSN Search">MSN</a>.</p>
    

    The title attribute is optional. Link names may contain letters, numbers and spaces, but are not case sensitive:

    I start my morning with a cup of coffee and
    [The New York Times][NY Times].
    
    [ny times]: http://www.nytimes.com/
    

    Output:

    <p>I start my morning with a cup of coffee and
    <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    

    Images

    Image syntax is very much like link syntax.

    Inline (titles are optional):

    ![alt text](/path/to/img.jpg "Title")
    

    Reference-style:

    ![alt text][id]
    
    [id]: /path/to/img.jpg "Title"
    

    Both of the above examples produce the same output:

    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    

    Code

    In a regular paragraph, you can create code span by wrapping text in backtick quotes. Any ampersands (&) and angle brackets (< or >) will automatically be translated into HTML entities. This makes it easy to use Markdown to write about HTML example code:

    I strongly recommend against using any `<blink>` tags.
    
    I wish SmartyPants used named entities like `&mdash;`
    instead of decimal-encoded entites like `&#8212;`.
    

    Output:

    <p>I strongly recommend against using any
    <code>&lt;blink&gt;</code> tags.</p>
    
    <p>I wish SmartyPants used named entities like
    <code>&amp;mdash;</code> instead of decimal-encoded
    entites like <code>&amp;#8212;</code>.</p>
    

    To specify an entire block of pre-formatted code, indent every line of the block by 4 spaces or 1 tab. Just like with code spans, &, <, and > characters will be escaped automatically.

    Markdown:

    If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:
    
        <blockquote>
            <p>For example.</p>
        </blockquote>
    

    Output:

    <p>If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:</p>
    
    <pre><code>&lt;blockquote&gt;
        &lt;p&gt;For example.&lt;/p&gt;
    &lt;/blockquote&gt;
    </code></pre>
    
    Markdown-2.6.9/tests/basic/markdown-documentation-basics.txt0000644000076500000240000001760013064117426024657 0ustar waylanstaff00000000000000Markdown: Basics ================ Getting the Gist of Markdown's Formatting Syntax ------------------------------------------------ This page offers a brief overview of what it's like to use Markdown. The [syntax page] [s] provides complete, detailed documentation for every feature, but Markdown should be very easy to pick up simply by looking at a few examples of it in action. The examples on this page are written in a before/after style, showing example syntax and the HTML output produced by Markdown. It's also helpful to simply try Markdown out; the [Dingus] [d] is a web application that allows you type your own Markdown-formatted text and translate it to XHTML. **Note:** This document is itself written using Markdown; you can [see the source for it by adding '.text' to the URL] [src]. [s]: /projects/markdown/syntax "Markdown Syntax" [d]: /projects/markdown/dingus "Markdown Dingus" [src]: /projects/markdown/basics.text ## Paragraphs, Headers, Blockquotes ## A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. Markdown offers two styles of headers: *Setext* and *atx*. Setext-style headers for `

    ` and `

    ` are created by "underlining" with equal signs (`=`) and hyphens (`-`), respectively. To create an atx-style header, you put 1-6 hash marks (`#`) at the beginning of the line -- the number of hashes equals the resulting HTML header level. Blockquotes are indicated using email-style '`>`' angle brackets. Markdown: A First Level Header ==================== A Second Level Header --------------------- Now is the time for all good men to come to the aid of their country. This is just a regular paragraph. The quick brown fox jumped over the lazy dog's back. ### Header 3 > This is a blockquote. > > This is the second paragraph in the blockquote. > > ## This is an H2 in a blockquote Output:

    A First Level Header

    A Second Level Header

    Now is the time for all good men to come to the aid of their country. This is just a regular paragraph.

    The quick brown fox jumped over the lazy dog's back.

    Header 3

    This is a blockquote.

    This is the second paragraph in the blockquote.

    This is an H2 in a blockquote

    ### Phrase Emphasis ### Markdown uses asterisks and underscores to indicate spans of emphasis. Markdown: Some of these words *are emphasized*. Some of these words _are emphasized also_. Use two asterisks for **strong emphasis**. Or, if you prefer, __use two underscores instead__. Output:

    Some of these words are emphasized. Some of these words are emphasized also.

    Use two asterisks for strong emphasis. Or, if you prefer, use two underscores instead.

    ## Lists ## Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`, `+`, and `-`) as list markers. These three markers are interchangable; this: * Candy. * Gum. * Booze. this: + Candy. + Gum. + Booze. and this: - Candy. - Gum. - Booze. all produce the same output:
    • Candy.
    • Gum.
    • Booze.
    Ordered (numbered) lists use regular numbers, followed by periods, as list markers: 1. Red 2. Green 3. Blue Output:
    1. Red
    2. Green
    3. Blue
    If you put blank lines between items, you'll get `

    ` tags for the list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab: * A list item. With multiple paragraphs. * Another item in the list. Output:

    • A list item.

      With multiple paragraphs.

    • Another item in the list.

    ### Links ### Markdown supports two styles for creating links: *inline* and *reference*. With both styles, you use square brackets to delimit the text you want to turn into a link. Inline-style links use parentheses immediately after the link text. For example: This is an [example link](http://example.com/). Output:

    This is an example link.

    Optionally, you may include a title attribute in the parentheses: This is an [example link](http://example.com/ "With a Title"). Output:

    This is an example link.

    Reference-style links allow you to refer to your links by names, which you define elsewhere in your document: I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search" Output:

    I get 10 times more traffic from Google than from Yahoo or MSN.

    The title attribute is optional. Link names may contain letters, numbers and spaces, but are *not* case sensitive: I start my morning with a cup of coffee and [The New York Times][NY Times]. [ny times]: http://www.nytimes.com/ Output:

    I start my morning with a cup of coffee and The New York Times.

    ### Images ### Image syntax is very much like link syntax. Inline (titles are optional): ![alt text](/path/to/img.jpg "Title") Reference-style: ![alt text][id] [id]: /path/to/img.jpg "Title" Both of the above examples produce the same output: alt text ### Code ### In a regular paragraph, you can create code span by wrapping text in backtick quotes. Any ampersands (`&`) and angle brackets (`<` or `>`) will automatically be translated into HTML entities. This makes it easy to use Markdown to write about HTML example code: I strongly recommend against using any `` tags. I wish SmartyPants used named entities like `—` instead of decimal-encoded entites like `—`. Output:

    I strongly recommend against using any <blink> tags.

    I wish SmartyPants used named entities like &mdash; instead of decimal-encoded entites like &#8212;.

    To specify an entire block of pre-formatted code, indent every line of the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`, and `>` characters will be escaped automatically. Markdown: If you want your page to validate under XHTML 1.0 Strict, you've got to put paragraph tags in your blockquotes:

    For example.

    Output:

    If you want your page to validate under XHTML 1.0 Strict, you've got to put paragraph tags in your blockquotes:

    <blockquote>
            <p>For example.</p>
        </blockquote>
        
    Markdown-2.6.9/tests/basic/markdown-syntax.html0000644000076500000240000007554613064117426022234 0ustar waylanstaff00000000000000

    Markdown: Syntax

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

    Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

    To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    For example, to add an HTML table to a Markdown article:

    This is a regular paragraph.
    
    <table>
        <tr>
            <td>Foo</td>
        </tr>
    </table>
    
    This is another regular paragraph.
    

    Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

    Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.

    Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

    Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

    http://images.google.com/images?num=30&q=larry+bird
    

    you need to encode the URL as:

    http://images.google.com/images?num=30&amp;q=larry+bird
    

    in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

    Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

    So, if you want to include a copyright symbol in your article, you can write:

    &copy;
    

    and Markdown will leave it alone. But if you write:

    AT&T
    

    Markdown will translate it to:

    AT&amp;T
    

    Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

    4 < 5
    

    Markdown will translate it to:

    4 &lt; 5
    

    However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)


    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    Markdown supports two styles of headers, Setext and atx.

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    =============
    
    This is an H2
    -------------
    

    Any number of underlining ='s or -'s will work.

    Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:

    # This is an H1
    
    ## This is an H2
    
    ###### This is an H6
    

    Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :

    # This is an H1 #
    
    ## This is an H2 ##
    
    ### This is an H3 ######
    

    Blockquotes

    Markdown uses email-style > characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    > 
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    > id sem consectetuer libero luctus adipiscing.
    

    Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    id sem consectetuer libero luctus adipiscing.
    

    Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

    > This is the first level of quoting.
    >
    > > This is nested blockquote.
    >
    > Back to the first level.
    

    Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

    > ## This is a header.
    > 
    > 1.   This is the first list item.
    > 2.   This is the second list item.
    > 
    > Here's some example code:
    > 
    >     return shell_exec("echo $input | $markdown_script");
    

    Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists.

    Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:

    *   Red
    *   Green
    *   Blue
    

    is equivalent to:

    +   Red
    +   Green
    +   Blue
    

    and:

    -   Red
    -   Green
    -   Blue
    

    Ordered lists use numbers followed by periods:

    1.  Bird
    2.  McHale
    3.  Parish
    

    It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
    

    If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
    

    or even:

    3. Bird
    1. McHale
    8. Parish
    

    you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to.

    If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

    List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

    To make lists look nice, you can wrap items with hanging indents:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
        Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
        viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
        Suspendisse id sem consectetuer libero luctus adipiscing.
    

    But if you want to be lazy, you don't have to:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
    

    If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output. For example, this input:

    *   Bird
    *   Magic
    

    will turn into:

    <ul>
    <li>Bird</li>
    <li>Magic</li>
    </ul>
    

    But this:

    *   Bird
    
    *   Magic
    

    will turn into:

    <ul>
    <li><p>Bird</p></li>
    <li><p>Magic</p></li>
    </ul>
    

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:

    1.  This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus adipiscing.
    

    It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:

    *   This is a list item with two paragraphs.
    
        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.
    
    *   Another item in the same list.
    

    To put a blockquote within a list item, the blockquote's > delimiters need to be indented:

    *   A list item with a blockquote:
    
        > This is a blockquote
        > inside a list item.
    

    To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:

    *   A list item with a code block:
    
            <code goes here>
    

    It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:

    1986. What a great season.
    

    In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:

    1986\. What a great season.
    

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>
    

    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:

    Here is an example of AppleScript:
    
        tell application "Foo"
            beep
        end tell
    

    will turn into:

    <p>Here is an example of AppleScript:</p>
    
    <pre><code>tell application "Foo"
        beep
    end tell
    </code></pre>
    

    A code block continues until it reaches a line that is not indented (or the end of the article).

    Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

        <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
    

    will turn into:

    <pre><code>&lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
    </code></pre>
    

    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

    * * *
    
    ***
    
    *****
    
    - - -
    
    ---------------------------------------
    
    _ _ _
    

    Span Elements

    Markdown supports two style of links: inline and reference.

    In both styles, the link text is delimited by [square brackets].

    To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

    This is [an example](http://example.com/ "Title") inline link.
    
    [This link](http://example.net/) has no title attribute.
    

    Will produce:

    <p>This is <a href="http://example.com/" title="Title">
    an example</a> inline link.</p>
    
    <p><a href="http://example.net/">This link</a> has no
    title attribute.</p>
    

    If you're referring to a local resource on the same server, you can use relative paths:

    See my [About](/about/) page for details.
    

    Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

    This is [an example][id] reference-style link.
    

    You can optionally use a space to separate the sets of brackets:

    This is [an example] [id] reference-style link.
    

    Then, anywhere in the document, you define your link label like this, on a line by itself:

    [id]: http://example.com/  "Optional Title Here"
    

    That is:

    • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
    • followed by a colon;
    • followed by one or more spaces (or tabs);
    • followed by the URL for the link;
    • optionally followed by a title attribute for the link, enclosed in double or single quotes.

    The link URL may, optionally, be surrounded by angle brackets:

    [id]: <http://example.com/>  "Optional Title Here"
    

    You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"
    

    Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

    Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

    [link text][a]
    [link text][A]
    

    are equivalent.

    The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

    [Google][]
    

    And then define the link:

    [Google]: http://google.com/
    

    Because link names may contain spaces, this shortcut even works for multiple words in the link text:

    Visit [Daring Fireball][] for more information.
    

    And then define the link:

    [Daring Fireball]: http://daringfireball.net/
    

    Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

    Here's an example of reference links in action:

    I get 10 times more traffic from [Google] [1] than from
    [Yahoo] [2] or [MSN] [3].
    
      [1]: http://google.com/        "Google"
      [2]: http://search.yahoo.com/  "Yahoo Search"
      [3]: http://search.msn.com/    "MSN Search"
    

    Using the implicit link name shortcut, you could instead write:

    I get 10 times more traffic from [Google][] than from
    [Yahoo][] or [MSN][].
    
      [google]: http://google.com/        "Google"
      [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
      [msn]:    http://search.msn.com/    "MSN Search"
    

    Both of the above examples will produce the following HTML output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from
    <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
    or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
    

    For comparison, here is the same paragraph written using Markdown's inline link style:

    I get 10 times more traffic from [Google](http://google.com/ "Google")
    than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
    [MSN](http://search.msn.com/ "MSN Search").
    

    The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

    With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

    *single asterisks*
    
    _single underscores_
    
    **double asterisks**
    
    __double underscores__
    

    will produce:

    <em>single asterisks</em>
    
    <em>single underscores</em>
    
    <strong>double asterisks</strong>
    
    <strong>double underscores</strong>
    

    You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

    Emphasis can be used in the middle of a word:

    un*fucking*believable
    

    But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

    To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

    \*this text is surrounded by literal asterisks\*
    

    Code

    To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    

    will produce:

    <p>Use the <code>printf()</code> function.</p>
    

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal backtick (`) here.``
    

    which will produce this:

    <p><code>There is a literal backtick (`) here.</code></p>
    

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    
    A backtick-delimited string in a code span: `` `foo` ``
    

    will produce:

    <p>A single backtick in a code span: <code>`</code></p>
    
    <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
    

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

    Please don't use any `<blink>` tags.
    

    into:

    <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
    

    You can write this:

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
    

    to produce:

    <p><code>&amp;#8212;</code> is the decimal-encoded
    equivalent of <code>&amp;mdash;</code>.</p>
    

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

    Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
    

    That is:

    • An exclamation mark: !;
    • followed by a set of square brackets, containing the alt attribute text for the image;
    • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    

    Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

    [id]: url/to/image  "Optional title attribute"
    

    As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

    <http://example.com/>
    

    Markdown will turn this into:

    <a href="http://example.com/">http://example.com/</a>
    

    Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

    <address@example.com>
    

    into something like this:

    <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
    &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
    &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
    &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
    

    which will render in a browser as a clickable link to "address@example.com".

    (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can backslashes before the asterisks, like this:

    \*literal asterisks\*
    

    Markdown provides backslash escapes for the following characters:

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark
    
    Markdown-2.6.9/tests/basic/markdown-syntax.txt0000644000076500000240000006544713064117426022106 0ustar waylanstaff00000000000000Markdown: Syntax ================ * [Overview](#overview) * [Philosophy](#philosophy) * [Inline HTML](#html) * [Automatic Escaping for Special Characters](#autoescape) * [Block Elements](#block) * [Paragraphs and Line Breaks](#p) * [Headers](#header) * [Blockquotes](#blockquote) * [Lists](#list) * [Code Blocks](#precode) * [Horizontal Rules](#hr) * [Span Elements](#span) * [Links](#link) * [Emphasis](#em) * [Code](#code) * [Images](#img) * [Miscellaneous](#misc) * [Backslash Escapes](#backslash) * [Automatic Links](#autolink) **Note:** This document is itself written using Markdown; you can [see the source for it by adding '.text' to the URL][src]. [src]: /projects/markdown/syntax.text * * *

    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4], [Grutatext] [5], and [EtText] [6] -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email. [1]: http://docutils.sourceforge.net/mirror/setext.html [2]: http://www.aaronsw.com/2002/atx/ [3]: http://textism.com/tools/textile/ [4]: http://docutils.sourceforge.net/rst.html [5]: http://www.triptico.com/software/grutatxt.html [6]: http://ettext.taint.org/doc/ To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like \*emphasis\*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for *writing* for the web. Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is *not* to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a *publishing* format; Markdown is a *writing* format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text. For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags. The only restrictions are that block-level HTML elements -- e.g. `
    `, ``, `
    `, `

    `, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) `

    ` tags around HTML block-level tags. For example, to add an HTML table to a Markdown article: This is a regular paragraph.

    Foo
    This is another regular paragraph. Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an HTML block. Span-level HTML tags -- e.g. ``, ``, or `` -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML `` or `` tags instead of Markdown's link or image syntax, go right ahead. Unlike block-level HTML tags, Markdown syntax *is* processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: `<` and `&`. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. `<`, and `&`. Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write '`AT&T`'. You even need to escape ampersands within URLs. Thus, if you want to link to: http://images.google.com/images?num=30&q=larry+bird you need to encode the URL as: http://images.google.com/images?num=30&q=larry+bird in your anchor tag `href` attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites. Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into `&`. So, if you want to include a copyright symbol in your article, you can write: © and Markdown will leave it alone. But if you write: AT&T Markdown will translate it to: AT&T Similarly, because Markdown supports [inline HTML](#html), if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write: 4 < 5 Markdown will translate it to: 4 < 5 However, inside Markdown code spans and blocks, angle brackets and ampersands are *always* encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single `<` and `&` in your example code needs to be escaped.) * * *

    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a `
    ` tag. When you *do* want to insert a `
    ` break tag using Markdown, you end a line with two or more spaces, then type return. Yes, this takes a tad more effort to create a `
    `, but a simplistic "every line break is a `
    `" rule wouldn't work for Markdown. Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l] work best -- and look better -- when you format them with hard breaks. [bq]: #blockquote [l]: #list Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example: This is an H1 ============= This is an H2 ------------- Any number of underlining `=`'s or `-`'s will work. Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example: # This is an H1 ## This is an H2 ###### This is an H6 Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) : # This is an H1 # ## This is an H2 ## ### This is an H3 ######

    Blockquotes

    Markdown uses email-style `>` characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a `>` before every line: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse > id sem consectetuer libero luctus adipiscing. Markdown allows you to be lazy and only put the `>` before the first line of a hard-wrapped paragraph: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of `>`: > This is the first level of quoting. > > > This is nested blockquote. > > Back to the first level. Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: > ## This is a header. > > 1. This is the first list item. > 2. This is the second list item. > > Here's some example code: > > return shell_exec("echo $input | $markdown_script"); Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists. Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers: * Red * Green * Blue is equivalent to: + Red + Green + Blue and: - Red - Green - Blue Ordered lists use numbers followed by periods: 1. Bird 2. McHale 3. Parish It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
    1. Bird
    2. McHale
    3. Parish
    If you instead wrote the list in Markdown like this: 1. Bird 1. McHale 1. Parish or even: 3. Bird 1. McHale 8. Parish you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. To make lists look nice, you can wrap items with hanging indents: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. But if you want to be lazy, you don't have to: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. If list items are separated by blank lines, Markdown will wrap the items in `

    ` tags in the HTML output. For example, this input: * Bird * Magic will turn into:

    • Bird
    • Magic
    But this: * Bird * Magic will turn into:
    • Bird

    • Magic

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab: 1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 2. Suspendisse id sem consectetuer libero luctus adipiscing. It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy: * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. To put a blockquote within a list item, the blockquote's `>` delimiters need to be indented: * A list item with a blockquote: > This is a blockquote > inside a list item. To put a code block within a list item, the code block needs to be indented *twice* -- 8 spaces or two tabs: * A list item with a code block: It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this: 1986. What a great season. In other words, a *number-period-space* sequence at the beginning of a line. To avoid this, you can backslash-escape the period: 1986\. What a great season.

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both `
    ` and `` tags.
    
    To produce a code block in Markdown, simply indent every line of the
    block by at least 4 spaces or 1 tab. For example, given this input:
    
        This is a normal paragraph:
    
            This is a code block.
    
    Markdown will generate:
    
        

    This is a normal paragraph:

    This is a code block.
        
    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this: Here is an example of AppleScript: tell application "Foo" beep end tell will turn into:

    Here is an example of AppleScript:

    tell application "Foo"
            beep
        end tell
        
    A code block continues until it reaches a line that is not indented (or the end of the article). Within a code block, ampersands (`&`) and angle brackets (`<` and `>`) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this: will turn into:
    <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
        
    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (`
    `) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule: * * * *** ***** - - - --------------------------------------- _ _ _ * * *

    Span Elements

    Markdown supports two style of links: *inline* and *reference*. In both styles, the link text is delimited by [square brackets]. To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an *optional* title for the link, surrounded in quotes. For example: This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute. Will produce:

    This is an example inline link.

    This link has no title attribute.

    If you're referring to a local resource on the same server, you can use relative paths: See my [About](/about/) page for details. Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link: This is [an example][id] reference-style link. You can optionally use a space to separate the sets of brackets: This is [an example] [id] reference-style link. Then, anywhere in the document, you define your link label like this, on a line by itself: [id]: http://example.com/ "Optional Title Here" That is: * Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces); * followed by a colon; * followed by one or more spaces (or tabs); * followed by the URL for the link; * optionally followed by a title attribute for the link, enclosed in double or single quotes. The link URL may, optionally, be surrounded by angle brackets: [id]: "Optional Title Here" You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs: [id]: http://example.com/longish/path/to/resource/here "Optional Title Here" Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output. Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links: [link text][a] [link text][A] are equivalent. The *implicit link name* shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write: [Google][] And then define the link: [Google]: http://google.com/ Because link names may contain spaces, this shortcut even works for multiple words in the link text: Visit [Daring Fireball][] for more information. And then define the link: [Daring Fireball]: http://daringfireball.net/ Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes. Here's an example of reference links in action: I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search" Using the implicit link name shortcut, you could instead write: I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][]. [google]: http://google.com/ "Google" [yahoo]: http://search.yahoo.com/ "Yahoo Search" [msn]: http://search.msn.com/ "MSN Search" Both of the above examples will produce the following HTML output:

    I get 10 times more traffic from Google than from Yahoo or MSN.

    For comparison, here is the same paragraph written using Markdown's inline link style: I get 10 times more traffic from [Google](http://google.com/ "Google") than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or [MSN](http://search.msn.com/ "MSN Search"). The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text. With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (`*`) and underscores (`_`) as indicators of emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` tag. E.g., this input: *single asterisks* _single underscores_ **double asterisks** __double underscores__ will produce: single asterisks single underscores double asterisks double underscores You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span. Emphasis can be used in the middle of a word: un*fucking*believable But if you surround an `*` or `_` with spaces, it'll be treated as a literal asterisk or underscore. To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it: \*this text is surrounded by literal asterisks\*

    Code

    To indicate a span of code, wrap it with backtick quotes (`` ` ``). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example: Use the `printf()` function. will produce:

    Use the printf() function.

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: ``There is a literal backtick (`) here.`` which will produce this:

    There is a literal backtick (`) here.

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span: A single backtick in a code span: `` ` `` A backtick-delimited string in a code span: `` `foo` `` will produce:

    A single backtick in a code span: `

    A backtick-delimited string in a code span: `foo`

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this: Please don't use any `` tags. into:

    Please don't use any <blink> tags.

    You can write this: `—` is the decimal-encoded equivalent of `—`. to produce:

    &#8212; is the decimal-encoded equivalent of &mdash;.

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format. Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: *inline* and *reference*. Inline image syntax looks like this: ![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title") That is: * An exclamation mark: `!`; * followed by a set of square brackets, containing the `alt` attribute text for the image; * followed by a set of parentheses, containing the URL or path to the image, and an optional `title` attribute enclosed in double or single quotes. Reference-style image syntax looks like this: ![Alt text][id] Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references: [id]: url/to/image "Optional title attribute" As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML `` tags. * * *

    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: Markdown will turn this into: http://example.com/ Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this: into something like this: address@exa mple.com which will render in a browser as a clickable link to "address@example.com". (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML `` tag), you can backslashes before the asterisks, like this: \*literal asterisks\* Markdown provides backslash escapes for the following characters: \ backslash ` backtick * asterisk _ underscore {} curly braces [] square brackets () parentheses # hash mark + plus sign - minus sign (hyphen) . dot ! exclamation mark Markdown-2.6.9/tests/basic/nested-blockquotes.html0000644000076500000240000000012613064117426022657 0ustar waylanstaff00000000000000

    foo

    bar

    foo

    Markdown-2.6.9/tests/basic/nested-blockquotes.txt0000644000076500000240000000003013064117426022524 0ustar waylanstaff00000000000000> foo > > > bar > > foo Markdown-2.6.9/tests/basic/ordered-and-unordered-list.html0000644000076500000240000000307213064117426024171 0ustar waylanstaff00000000000000

    Unordered

    Asterisks tight:

    • asterisk 1
    • asterisk 2
    • asterisk 3

    Asterisks loose:

    • asterisk 1

    • asterisk 2

    • asterisk 3


    Pluses tight:

    • Plus 1
    • Plus 2
    • Plus 3

    Pluses loose:

    • Plus 1

    • Plus 2

    • Plus 3


    Minuses tight:

    • Minus 1
    • Minus 2
    • Minus 3

    Minuses loose:

    • Minus 1

    • Minus 2

    • Minus 3

    Ordered

    Tight:

    1. First
    2. Second
    3. Third

    and:

    1. One
    2. Two
    3. Three

    Loose using tabs:

    1. First

    2. Second

    3. Third

    and using spaces:

    1. One

    2. Two

    3. Three

    Multiple paragraphs:

    1. Item 1, graf one.

      Item 2. graf two. The quick brown fox jumped over the lazy dog's back.

    2. Item 2.

    3. Item 3.

    Nested

    • Tab
      • Tab
        • Tab

    Here's another:

    1. First
    2. Second:
      • Fee
      • Fie
      • Foe
    3. Third

    Same thing but with paragraphs:

    1. First

    2. Second:

      • Fee
      • Fie
      • Foe
    3. Third

    Markdown-2.6.9/tests/basic/ordered-and-unordered-list.txt0000644000076500000240000000151113064117426024040 0ustar waylanstaff00000000000000## Unordered Asterisks tight: * asterisk 1 * asterisk 2 * asterisk 3 Asterisks loose: * asterisk 1 * asterisk 2 * asterisk 3 * * * Pluses tight: + Plus 1 + Plus 2 + Plus 3 Pluses loose: + Plus 1 + Plus 2 + Plus 3 * * * Minuses tight: - Minus 1 - Minus 2 - Minus 3 Minuses loose: - Minus 1 - Minus 2 - Minus 3 ## Ordered Tight: 1. First 2. Second 3. Third and: 1. One 2. Two 3. Three Loose using tabs: 1. First 2. Second 3. Third and using spaces: 1. One 2. Two 3. Three Multiple paragraphs: 1. Item 1, graf one. Item 2. graf two. The quick brown fox jumped over the lazy dog's back. 2. Item 2. 3. Item 3. ## Nested * Tab * Tab * Tab Here's another: 1. First 2. Second: * Fee * Fie * Foe 3. Third Same thing but with paragraphs: 1. First 2. Second: * Fee * Fie * Foe 3. Third Markdown-2.6.9/tests/basic/strong-and-em-together.html0000644000076500000240000000032313064117426023335 0ustar waylanstaff00000000000000

    This is strong and em.

    So is this word.

    This is strong and em.

    So is this word.

    Markdown-2.6.9/tests/basic/strong-and-em-together.txt0000644000076500000240000000015313064117426023211 0ustar waylanstaff00000000000000***This is strong and em.*** So is ***this*** word. ___This is strong and em.___ So is ___this___ word. Markdown-2.6.9/tests/basic/tabs.html0000644000076500000240000000067413064117426020005 0ustar waylanstaff00000000000000
    • this is a list item indented with tabs

    • this is a list item indented with spaces

    Code:

    this code block is indented by one tab
    

    And:

        this code block is indented by two tabs
    

    And:

    +   this is an example list item
        indented with tabs
    
    +   this is an example list item
        indented with spaces
    
    Markdown-2.6.9/tests/basic/tabs.txt0000644000076500000240000000046713064117426017660 0ustar waylanstaff00000000000000+ this is a list item indented with tabs + this is a list item indented with spaces Code: this code block is indented by one tab And: this code block is indented by two tabs And: + this is an example list item indented with tabs + this is an example list item indented with spaces Markdown-2.6.9/tests/basic/tidyness.html0000644000076500000240000000020413064117426020703 0ustar waylanstaff00000000000000

    A list within a blockquote:

    • asterisk 1
    • asterisk 2
    • asterisk 3
    Markdown-2.6.9/tests/basic/tidyness.txt0000644000076500000240000000011613064117426020560 0ustar waylanstaff00000000000000> A list within a blockquote: > > * asterisk 1 > * asterisk 2 > * asterisk 3 Markdown-2.6.9/tests/extensions/0000755000076500000240000000000013145427671017303 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/extensions/admonition.html0000644000076500000240000000202113064117426022317 0ustar waylanstaff00000000000000

    Some text

    Note

    A normal paragraph here

    1. first
    2. second

    Some important quote

    another paragraph in the quote

    int main() {
        // insert some code
    }
    

    More text and stuff.

    Did you know?

    You can customize the title of the admonition

    Not part of an Admonition!

    And now...

    For something completely different.

    You can also use a custom CSS class name.

    An explicitly empty string prevents the title from being rendered.

    No body:

    Note

    Extra whitespace after the title should not alter output:

    Note

    Markdown-2.6.9/tests/extensions/admonition.txt0000644000076500000240000000117613064117426022204 0ustar waylanstaff00000000000000Some text !!! note A normal paragraph here 1. first 2. second > Some important quote > another paragraph in the quote int main() { // insert some code } More text and stuff. !!! Note "Did you know?" You can customize the title of the admonition Not part of an Admonition! !!! mycustomcssclass "And now..." For something completely different. You can also use a custom CSS class name. !!! tip "" An explicitly empty string prevents the title from being rendered. No body: !!! note Extra whitespace after the title should not alter output: !!! note Markdown-2.6.9/tests/extensions/attr_list.html0000644000076500000240000000416313064117426022174 0ustar waylanstaff00000000000000

    This is a sextext header

    A paragraph with some text. Line two of the paragraph.

    This is another

    Test some inline text. A link And a nested link

    This is a hash Header

    And now some random attributes.

    No closing hash header

    Now test overrides

    # A code block which contains attr_list syntax
    # This should be ignored.
    {: #someid .someclass }
    

    No colon for compatability with Headerid ext

    Also a codespan: {: .someclass}.

    Bad Syntax

    • Item1
    • Item2
      • Item2-1
    • Item3
      • Item3-1
    • Item4
      • Item4-1
    • Item5

    And ordered lists too

    1. Item1
    2. Item2
      1. Item2-1
    3. Item3
      1. Item3-1
    4. Item4
      1. Item4-1
    5. Item5

    Definition lists

    DT1
    DT2
    Some dd
    dd
    DT3
    Some dd

    Bad attributes

    Key without value

    Value without key

    No key or value

    Weirdness

    More weirdness

    This should not cause a crash

    Attr_lists do not contain newlines{ foo=bar key=value }

    Markdown-2.6.9/tests/extensions/attr_list.txt0000644000076500000240000000327513064117426022052 0ustar waylanstaff00000000000000This is a sextext header {: #setext} ==================================== A paragraph with some text. Line two of the paragraph. {: #par1 .myclass } This is another {: #sextext2 .someclass} ---------------------------------------- Test some _inline_{: .inline} text. A [link](http://example.com){: .linkkyclass title="A title."} And a __nested [link][]{: .linky2}__{: .nest} [link]: http://example.com "Some title" ### This is a hash Header ### {: #hash} And now some random attributes. {:foo bar='b az' baz="blah blah" title="I wasn't kidding!" } ### No closing hash header {: #hash2} Now test overrides {: #overrideme .andme id=overridden class='foo bar' .addme } # A code block which contains attr_list syntax # This should be ignored. {: #someid .someclass } ### No colon for compatability with Headerid ext { #hash3 } Also a codespan: `{: .someclass}`{: .foo}. {: #the_end} ### Bad Syntax { {: #hash5 } * Item1 {: .item } * Item2 {: .item } * Item2-1 {: .subitem } * _Item3_{: .emph } {: .item } * _Item3-1_{: .emph } {: .subitem } * Item4 * Item4-1 * Item5 # And ordered lists *too*{.inline} 1. Item1 {: .item } 2. Item2 {: .item } 1. Item2-1 {: .subitem } 3. _Item3_{: .emph } {: .item } 1. _Item3-1_{: .emph } {: .subitem } 4. Item4 1. Item4-1 5. Item5 # Definition *lists* {.block} DT1 {.term} DT2 {.term} : Some dd {.def} : *dd*{.inline} *DT3*{.inline} : Some dd # Bad attributes Key without *value*{ foo= } Value without *key*{ =bar } No *key or value*{ = } *Weirdness*{ == } *More weirdness*{ === } This should not cause a *crash*{ foo=a=b } Attr_lists do not contain *newlines*{ foo=bar key=value } Markdown-2.6.9/tests/extensions/codehilite.html0000644000076500000240000000250013064117426022271 0ustar waylanstaff00000000000000

    Some text

    1
    2
    3
    4
    5
    6
    def __init__ (self, pattern) :
        self.pattern = pattern
        self.compiled_re = re.compile("^(.*)%s(.*)$" % pattern, re.DOTALL)
    
    def getCompiledRegExp (self) :
        return self.compiled_re
    

    More text

    Markdown-2.6.9/tests/extensions/codehilite.txt0000644000076500000240000000036413064117426022152 0ustar waylanstaff00000000000000 Some text #!python def __init__ (self, pattern) : self.pattern = pattern self.compiled_re = re.compile("^(.*)%s(.*)$" % pattern, re.DOTALL) def getCompiledRegExp (self) : return self.compiled_re More textMarkdown-2.6.9/tests/extensions/extra/0000755000076500000240000000000013145427671020426 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/extensions/extra/abbr.html0000644000076500000240000000042313064117426022213 0ustar waylanstaff00000000000000

    An ABBR: "REF". ref and REFERENCE should be ignored.

    The HTML specification is maintained by the W3C.

    Markdown-2.6.9/tests/extensions/extra/abbr.txt0000644000076500000240000000040713064117426022070 0ustar waylanstaff00000000000000An ABBR: "REF". ref and REFERENCE should be ignored. *[REF]: Reference *[ABBR]: This gets overriden by the next one. *[ABBR]: Abbreviation The HTML specification is maintained by the W3C. *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium Markdown-2.6.9/tests/extensions/extra/def-in-list.html0000644000076500000240000000050013064117426023414 0ustar waylanstaff00000000000000

    : a paragraph that starts with a colon

    • A List item
    • A def term
      A def item
      a second
    • Another def term

      a loose item

      a second

    • : a list item that starts with a colon

    Markdown-2.6.9/tests/extensions/extra/def-in-list.txt0000644000076500000240000000031613064117426023274 0ustar waylanstaff00000000000000: a paragraph that starts with a colon * A List item * A def term : A def item : a second * Another def term : a loose item : a second * : a list item that starts with a colon Markdown-2.6.9/tests/extensions/extra/extra_config.html0000644000076500000240000000050213064117426023753 0ustar waylanstaff00000000000000

    1. A Footnote. 

    Some text with a footnote1.

    Markdown-2.6.9/tests/extensions/extra/extra_config.txt0000644000076500000240000000010513064117426023625 0ustar waylanstaff00000000000000~~~placemarker~~~ Some text with a footnote[^1]. [^1]: A Footnote. Markdown-2.6.9/tests/extensions/extra/footnote.html0000644000076500000240000001047413064117426023151 0ustar waylanstaff00000000000000

    This is the body with a footnote1 or two2 or more3 4 5.

    Also a reference that does not exist[^6].

    Duplicate6 footnotes6 test6.

    Duplicate7 footnotes7 test7.

    Single after duplicates8.

    Test emphasis at end of footnote9

    Complex footnote content10


    1. Footnote that ends with a list:

      • item 1
      • item 2

    2. This footnote is a blockquote.

    3. A simple oneliner. 

    4. A footnote with multiple paragraphs.

      Paragraph two. 

    5. First line of first paragraph. Second line of first paragraph is not intended. Nor is third... 

    6. emphasis works

      emphasis still works 

      1. The top couple half figure, contrary sides and hands across with bottom couple,

        Half figure back on your own sides, and turn partner to places,

        Swing partners with right hands into straight line long-ways, as in a reel, and

        Set,

        Hey and return to places,

        The other three couples do the same.

      2. Top and bottom couples meet and set,

        Then each gentleman leas the opposite lady to the couple on his left, and set,

        Aach four right and left,

        Swing side couples to places, and turn partners all eight,

        The other two couple o the same.

    Markdown-2.6.9/tests/extensions/extra/footnote.txt0000644000076500000240000000242513064117426023021 0ustar waylanstaff00000000000000This is the body with a footnote[^1] or two[^2] or more[^3] [^4] [^5]. Also a reference that does not exist[^6]. Duplicate[^a] footnotes[^a] test[^a]. Duplicate[^b] footnotes[^b] test[^b]. Single after duplicates[^c]. Test emphasis at end of footnote[^d] Complex footnote content[^e] [^1]: Footnote that ends with a list: * item 1 * item 2 [^2]: > This footnote is a blockquote. [^3]: A simple oneliner. [^4]: A footnote with multiple paragraphs. Paragraph two. [^5]: First line of first paragraph. Second line of first paragraph is not intended. Nor is third... [^a]: 1 [^b]: 2 [^c]: 3 [^d]: _emphasis works_ _emphasis still works_ [^e]: 1. The top couple half figure, contrary sides and hands across with bottom couple, Half figure back on your own sides, and turn partner to places, Swing partners with right hands into straight line long-ways, as in a reel, and Set, Hey and return to places, The other three couples do the same. 2. Top and bottom couples meet and set, Then each gentleman leas the opposite lady to the couple on his left, and set, Aach four right and left, Swing side couples to places, and turn partners all eight, The other two couple o the same. Markdown-2.6.9/tests/extensions/extra/footnote_many_footnotes.html0000644000076500000240000117610713064117426026304 0ustar waylanstaff00000000000000

    Something1

    Something2

    Something3

    Something4

    Something5

    Something6

    Something7

    Something8

    Something9

    Something10

    Something11

    Something12

    Something13

    Something14

    Something15

    Something16

    Something17

    Something18

    Something19

    Something20

    Something21

    Something22

    Something23

    Something24

    Something25

    Something26

    Something27

    Something28

    Something29

    Something30

    Something31

    Something32

    Something33

    Something34

    Something35

    Something36

    Something37

    Something38

    Something39

    Something40

    Something41

    Something42

    Something43

    Something44

    Something45

    Something46

    Something47

    Something48

    Something49

    Something50

    Something51

    Something52

    Something53

    Something54

    Something55

    Something56

    Something57

    Something58

    Something59

    Something60

    Something61

    Something62

    Something63

    Something64

    Something65

    Something66

    Something67

    Something68

    Something69

    Something70

    Something71

    Something72

    Something73

    Something74

    Something75

    Something76

    Something77

    Something78

    Something79

    Something80

    Something81

    Something82

    Something83

    Something84

    Something85

    Something86

    Something87

    Something88

    Something89

    Something90

    Something91

    Something92

    Something93

    Something94

    Something95

    Something96

    Something97

    Something98

    Something99

    Something100

    Something101

    Something102

    Something103

    Something104

    Something105

    Something106

    Something107

    Something108

    Something109

    Something110

    Something111

    Something112

    Something113

    Something114

    Something115

    Something116

    Something117

    Something118

    Something119

    Something120

    Something121

    Something122

    Something123

    Something124

    Something125

    Something126

    Something127

    Something128

    Something129

    Something130

    Something131

    Something132

    Something133

    Something134

    Something135

    Something136

    Something137

    Something138

    Something139

    Something140

    Something141

    Something142

    Something143

    Something144

    Something145

    Something146

    Something147

    Something148

    Something149

    Something150

    Something151

    Something152

    Something153

    Something154

    Something155

    Something156

    Something157

    Something158

    Something159

    Something160

    Something161

    Something162

    Something163

    Something164

    Something165

    Something166

    Something167

    Something168

    Something169

    Something170

    Something171

    Something172

    Something173

    Something174

    Something175

    Something176

    Something177

    Something178

    Something179

    Something180

    Something181

    Something182

    Something183

    Something184

    Something185

    Something186

    Something187

    Something188

    Something189

    Something190

    Something191

    Something192

    Something193

    Something194

    Something195

    Something196

    Something197

    Something198

    Something199

    Something200

    Something201

    Something202

    Something203

    Something204

    Something205

    Something206

    Something207

    Something208

    Something209

    Something210

    Something211

    Something212

    Something213

    Something214

    Something215

    Something216

    Something217

    Something218

    Something219

    Something220

    Something221

    Something222

    Something223

    Something224

    Something225

    Something226

    Something227

    Something228

    Something229

    Something230

    Something231

    Something232

    Something233

    Something234

    Something235

    Something236

    Something237

    Something238

    Something239

    Something240

    Something241

    Something242

    Something243

    Something244

    Something245

    Something246

    Something247

    Something248

    Something249

    Something250

    Something251

    Something252

    Something253

    Something254

    Something255

    Something256

    Something257

    Something258

    Something259

    Something260

    Something261

    Something262

    Something263

    Something264

    Something265

    Something266

    Something267

    Something268

    Something269

    Something270

    Something271

    Something272

    Something273

    Something274

    Something275

    Something276

    Something277

    Something278

    Something279

    Something280

    Something281

    Something282

    Something283

    Something284

    Something285

    Something286

    Something287

    Something288

    Something289

    Something290

    Something291

    Something292

    Something293

    Something294

    Something295

    Something296

    Something297

    Something298

    Something299

    Something300

    Something301

    Something302

    Something303

    Something304

    Something305

    Something306

    Something307

    Something308

    Something309

    Something310

    Something311

    Something312

    Something313

    Something314

    Something315

    Something316

    Something317

    Something318

    Something319

    Something320

    Something321

    Something322

    Something323

    Something324

    Something325

    Something326

    Something327

    Something328

    Something329

    Something330

    Something331

    Something332

    Something333

    Something334

    Something335

    Something336

    Something337

    Something338

    Something339

    Something340

    Something341

    Something342

    Something343

    Something344

    Something345

    Something346

    Something347

    Something348

    Something349

    Something350

    Something351

    Something352

    Something353

    Something354

    Something355

    Something356

    Something357

    Something358

    Something359

    Something360

    Something361

    Something362

    Something363

    Something364

    Something365

    Something366

    Something367

    Something368

    Something369

    Something370

    Something371

    Something372

    Something373

    Something374

    Something375

    Something376

    Something377

    Something378

    Something379

    Something380

    Something381

    Something382

    Something383

    Something384

    Something385

    Something386

    Something387

    Something388

    Something389

    Something390

    Something391

    Something392

    Something393

    Something394

    Something395

    Something396

    Something397

    Something398

    Something399

    Something400

    Something401

    Something402

    Something403

    Something404

    Something405

    Something406

    Something407

    Something408

    Something409

    Something410

    Something411

    Something412

    Something413

    Something414

    Something415

    Something416

    Something417

    Something418

    Something419

    Something420

    Something421

    Something422

    Something423

    Something424

    Something425

    Something426

    Something427

    Something428

    Something429

    Something430

    Something431

    Something432

    Something433

    Something434

    Something435

    Something436

    Something437

    Something438

    Something439

    Something440

    Something441

    Something442

    Something443

    Something444

    Something445

    Something446

    Something447

    Something448

    Something449

    Something450

    Something451

    Something452

    Something453

    Something454

    Something455

    Something456

    Something457

    Something458

    Something459

    Something460

    Something461

    Something462

    Something463

    Something464

    Something465

    Something466

    Something467

    Something468

    Something469

    Something470

    Something471

    Something472

    Something473

    Something474

    Something475

    Something476

    Something477

    Something478

    Something479

    Something480

    Something481

    Something482

    Something483

    Something484

    Something485

    Something486

    Something487

    Something488

    Something489

    Something490

    Something491

    Something492

    Something493

    Something494

    Something495

    Something496

    Something497

    Something498

    Something499

    Something500

    Something501

    Something502

    Something503

    Something504

    Something505

    Something506

    Something507

    Something508

    Something509

    Something510

    Something511

    Something512

    Something513

    Something514

    Something515

    Something516

    Something517

    Something518

    Something519

    Something520

    Something521

    Something522

    Something523

    Something524

    Something525

    Something526

    Something527

    Something528

    Something529

    Something530

    Something531

    Something532

    Something533

    Something534

    Something535

    Something536

    Something537

    Something538

    Something539

    Something540

    Something541

    Something542

    Something543

    Something544

    Something545

    Something546

    Something547

    Something548

    Something549

    Something550

    Something551

    Something552

    Something553

    Something554

    Something555

    Something556

    Something557

    Something558

    Something559

    Something560

    Something561

    Something562

    Something563

    Something564

    Something565

    Something566

    Something567

    Something568

    Something569

    Something570

    Something571

    Something572

    Something573

    Something574

    Something575

    Something576

    Something577

    Something578

    Something579

    Something580

    Something581

    Something582

    Something583

    Something584

    Something585

    Something586

    Something587

    Something588

    Something589

    Something590

    Something591

    Something592

    Something593

    Something594

    Something595

    Something596

    Something597

    Something598

    Something599

    Something600

    Something601

    Something602

    Something603

    Something604

    Something605

    Something606

    Something607

    Something608

    Something609

    Something610

    Something611

    Something612

    Something613

    Something614

    Something615

    Something616

    Something617

    Something618

    Something619

    Something620

    Something621

    Something622

    Something623

    Something624

    Something625

    Something626

    Something627

    Something628

    Something629

    Something630

    Something631

    Something632

    Something633

    Something634

    Something635

    Something636

    Something637

    Something638

    Something639

    Something640

    Something641

    Something642

    Something643

    Something644

    Something645

    Something646

    Something647

    Something648

    Something649

    Something650

    Something651

    Something652

    Something653

    Something654

    Something655

    Something656

    Something657

    Something658

    Something659

    Something660

    Something661

    Something662

    Something663

    Something664

    Something665

    Something666

    Something667

    Something668

    Something669

    Something670

    Something671

    Something672

    Something673

    Something674

    Something675

    Something676

    Something677

    Something678

    Something679

    Something680

    Something681

    Something682

    Something683

    Something684

    Something685

    Something686

    Something687

    Something688

    Something689

    Something690

    Something691

    Something692

    Something693

    Something694

    Something695

    Something696

    Something697

    Something698

    Something699

    Something700

    Something701

    Something702

    Something703

    Something704

    Something705

    Something706

    Something707

    Something708

    Something709

    Something710

    Something711

    Something712

    Something713

    Something714

    Something715

    Something716

    Something717

    Something718

    Something719

    Something720

    Something721

    Something722

    Something723

    Something724

    Something725

    Something726

    Something727

    Something728

    Something729

    Something730

    Something731

    Something732

    Something733

    Something734

    Something735

    Something736

    Something737

    Something738

    Something739

    Something740

    Something741

    Something742

    Something743

    Something744

    Something745

    Something746

    Something747

    Something748

    Something749

    Something750

    Something751

    Something752

    Something753

    Something754

    Something755

    Something756

    Something757

    Something758

    Something759

    Something760

    Something761

    Something762

    Something763

    Something764

    Something765

    Something766

    Something767

    Something768

    Something769

    Something770

    Something771

    Something772

    Something773

    Something774

    Something775

    Something776

    Something777

    Something778

    Something779

    Something780

    Something781

    Something782

    Something783

    Something784

    Something785

    Something786

    Something787

    Something788

    Something789

    Something790

    Something791

    Something792

    Something793

    Something794

    Something795

    Something796

    Something797

    Something798

    Something799

    Something800

    Something801

    Something802

    Something803

    Something804

    Something805

    Something806

    Something807

    Something808

    Something809

    Something810

    Something811

    Something812

    Something813

    Something814

    Something815

    Something816

    Something817

    Something818

    Something819

    Something820

    Something821

    Something822

    Something823

    Something824

    Something825

    Something826

    Something827

    Something828

    Something829

    Something830

    Something831

    Something832

    Something833

    Something834

    Something835

    Something836

    Something837

    Something838

    Something839

    Something840

    Something841

    Something842

    Something843

    Something844

    Something845

    Something846

    Something847

    Something848

    Something849

    Something850

    Something851

    Something852

    Something853

    Something854

    Something855

    Something856

    Something857

    Something858

    Something859

    Something860

    Something861

    Something862

    Something863

    Something864

    Something865

    Something866

    Something867

    Something868

    Something869

    Something870

    Something871

    Something872

    Something873

    Something874

    Something875

    Something876

    Something877

    Something878

    Something879

    Something880

    Something881

    Something882

    Something883

    Something884

    Something885

    Something886

    Something887

    Something888

    Something889

    Something890

    Something891

    Something892

    Something893

    Something894

    Something895

    Something896

    Something897

    Something898

    Something899

    Something900

    Something901

    Something902

    Something903

    Something904

    Something905

    Something906

    Something907

    Something908

    Something909

    Something910

    Something911

    Something912

    Something913

    Something914

    Something915

    Something916

    Something917

    Something918

    Something919

    Something920

    Something921

    Something922

    Something923

    Something924

    Something925

    Something926

    Something927

    Something928

    Something929

    Something930

    Something931

    Something932

    Something933

    Something934

    Something935

    Something936

    Something937

    Something938

    Something939

    Something940

    Something941

    Something942

    Something943

    Something944

    Something945

    Something946

    Something947

    Something948

    Something949

    Something950

    Something951

    Something952

    Something953

    Something954

    Something955

    Something956

    Something957

    Something958

    Something959

    Something960

    Something961

    Something962

    Something963

    Something964

    Something965

    Something966

    Something967

    Something968

    Something969

    Something970

    Something971

    Something972

    Something973

    Something974

    Something975

    Something976

    Something977

    Something978

    Something979

    Something980

    Something981

    Something982

    Something983

    Something984

    Something985

    Something986

    Something987

    Something988

    Something989

    Something990

    Something991

    Something992

    Something993

    Something994

    Something995

    Something996

    Something997

    Something998

    Something999

    Something1000

    Something1001

    Something1002

    Something1003

    Something1004

    Something1005

    Something1006

    Something1007

    Something1008

    Something1009

    Something1010

    Something1011

    Something1012

    Something1013

    Something1014

    Something1015

    Something1016

    Something1017

    Something1018

    Something1019

    Something1020

    Something1021

    Something1022

    Something1023

    Something1024

    Something1025

    Something1026

    Something1027

    Something1028

    Something1029

    Something1030

    Something1031

    Something1032

    Something1033

    Something1034

    Something1035

    Something1036

    Something1037

    Something1038

    Something1039

    Something1040

    Something1041

    Something1042

    Something1043

    Something1044

    Something1045

    Something1046

    Something1047

    Something1048

    Something1049

    Something1050

    Something1051

    Something1052

    Something1053

    Something1054

    Something1055

    Something1056

    Something1057

    Something1058

    Something1059

    Something1060

    Something1061

    Something1062

    Something1063

    Something1064

    Something1065

    Something1066

    Something1067

    Something1068

    Something1069

    Something1070

    Something1071

    Something1072

    Something1073

    Something1074

    Something1075

    Something1076

    Something1077

    Something1078

    Something1079

    Something1080

    Something1081

    Something1082

    Something1083

    Something1084

    Something1085

    Something1086

    Something1087

    Something1088

    Something1089

    Something1090

    Something1091

    Something1092

    Something1093

    Something1094

    Something1095

    Something1096

    Something1097

    Something1098

    Something1099

    Something1100

    Something1101

    Something1102

    Something1103

    Something1104

    Something1105

    Something1106

    Something1107

    Something1108

    Something1109

    Something1110

    Something1111

    Something1112

    Something1113

    Something1114

    Something1115

    Something1116

    Something1117

    Something1118

    Something1119

    Something1120

    Something1121

    Something1122

    Something1123

    Something1124

    Something1125

    Something1126

    Something1127

    Something1128

    Something1129

    Something1130

    Something1131

    Something1132

    Something1133

    Something1134

    Something1135

    Something1136

    Something1137

    Something1138

    Something1139

    Something1140

    Something1141

    Something1142

    Something1143

    Something1144

    Something1145

    Something1146

    Something1147

    Something1148

    Something1149

    Something1150

    Something1151

    Something1152

    Something1153

    Something1154

    Something1155

    Something1156

    Something1157

    Something1158

    Something1159

    Something1160

    Something1161

    Something1162

    Something1163

    Something1164

    Something1165

    Something1166

    Something1167

    Something1168

    Something1169

    Something1170

    Something1171

    Something1172

    Something1173

    Something1174

    Something1175

    Something1176

    Something1177

    Something1178

    Something1179

    Something1180

    Something1181

    Something1182

    Something1183

    Something1184

    Something1185

    Something1186

    Something1187

    Something1188

    Something1189

    Something1190

    Something1191

    Something1192

    Something1193

    Something1194

    Something1195

    Something1196

    Something1197

    Something1198

    Something1199


    1. Another thing 

    2. Another thing 

    3. Another thing 

    4. Another thing 

    5. Another thing 

    6. Another thing 

    7. Another thing 

    8. Another thing 

    9. Another thing 

    10. Another thing 

    11. Another thing 

    12. Another thing 

    13. Another thing 

    14. Another thing 

    15. Another thing 

    16. Another thing 

    17. Another thing 

    18. Another thing 

    19. Another thing 

    20. Another thing 

    21. Another thing 

    22. Another thing 

    23. Another thing 

    24. Another thing 

    25. Another thing 

    26. Another thing 

    27. Another thing 

    28. Another thing 

    29. Another thing 

    30. Another thing 

    31. Another thing 

    32. Another thing 

    33. Another thing 

    34. Another thing 

    35. Another thing 

    36. Another thing 

    37. Another thing 

    38. Another thing 

    39. Another thing 

    40. Another thing 

    41. Another thing 

    42. Another thing 

    43. Another thing 

    44. Another thing 

    45. Another thing 

    46. Another thing 

    47. Another thing 

    48. Another thing 

    49. Another thing 

    50. Another thing 

    51. Another thing 

    52. Another thing 

    53. Another thing 

    54. Another thing 

    55. Another thing 

    56. Another thing 

    57. Another thing 

    58. Another thing 

    59. Another thing 

    60. Another thing 

    61. Another thing 

    62. Another thing 

    63. Another thing 

    64. Another thing 

    65. Another thing 

    66. Another thing 

    67. Another thing 

    68. Another thing 

    69. Another thing 

    70. Another thing 

    71. Another thing 

    72. Another thing 

    73. Another thing 

    74. Another thing 

    75. Another thing 

    76. Another thing 

    77. Another thing 

    78. Another thing 

    79. Another thing 

    80. Another thing 

    81. Another thing 

    82. Another thing 

    83. Another thing 

    84. Another thing 

    85. Another thing 

    86. Another thing 

    87. Another thing 

    88. Another thing 

    89. Another thing 

    90. Another thing 

    91. Another thing 

    92. Another thing 

    93. Another thing 

    94. Another thing 

    95. Another thing 

    96. Another thing 

    97. Another thing 

    98. Another thing 

    99. Another thing 

    100. Another thing 

    101. Another thing 

    102. Another thing 

    103. Another thing 

    104. Another thing 

    105. Another thing 

    106. Another thing 

    107. Another thing 

    108. Another thing 

    109. Another thing 

    110. Another thing 

    111. Another thing 

    112. Another thing 

    113. Another thing 

    114. Another thing 

    115. Another thing 

    116. Another thing 

    117. Another thing 

    118. Another thing 

    119. Another thing 

    120. Another thing 

    121. Another thing 

    122. Another thing 

    123. Another thing 

    124. Another thing 

    125. Another thing 

    126. Another thing 

    127. Another thing 

    128. Another thing 

    129. Another thing 

    130. Another thing 

    131. Another thing 

    132. Another thing 

    133. Another thing 

    134. Another thing 

    135. Another thing 

    136. Another thing 

    137. Another thing 

    138. Another thing 

    139. Another thing 

    140. Another thing 

    141. Another thing 

    142. Another thing 

    143. Another thing 

    144. Another thing 

    145. Another thing 

    146. Another thing 

    147. Another thing 

    148. Another thing 

    149. Another thing 

    150. Another thing 

    151. Another thing 

    152. Another thing 

    153. Another thing 

    154. Another thing 

    155. Another thing 

    156. Another thing 

    157. Another thing 

    158. Another thing 

    159. Another thing 

    160. Another thing 

    161. Another thing 

    162. Another thing 

    163. Another thing 

    164. Another thing 

    165. Another thing 

    166. Another thing 

    167. Another thing 

    168. Another thing 

    169. Another thing 

    170. Another thing 

    171. Another thing 

    172. Another thing 

    173. Another thing 

    174. Another thing 

    175. Another thing 

    176. Another thing 

    177. Another thing 

    178. Another thing 

    179. Another thing 

    180. Another thing 

    181. Another thing 

    182. Another thing 

    183. Another thing 

    184. Another thing 

    185. Another thing 

    186. Another thing 

    187. Another thing 

    188. Another thing 

    189. Another thing 

    190. Another thing 

    191. Another thing 

    192. Another thing 

    193. Another thing 

    194. Another thing 

    195. Another thing 

    196. Another thing 

    197. Another thing 

    198. Another thing 

    199. Another thing 

    200. Another thing 

    201. Another thing 

    202. Another thing 

    203. Another thing 

    204. Another thing 

    205. Another thing 

    206. Another thing 

    207. Another thing 

    208. Another thing 

    209. Another thing 

    210. Another thing 

    211. Another thing 

    212. Another thing 

    213. Another thing 

    214. Another thing 

    215. Another thing 

    216. Another thing 

    217. Another thing 

    218. Another thing 

    219. Another thing 

    220. Another thing 

    221. Another thing 

    222. Another thing 

    223. Another thing 

    224. Another thing 

    225. Another thing 

    226. Another thing 

    227. Another thing 

    228. Another thing 

    229. Another thing 

    230. Another thing 

    231. Another thing 

    232. Another thing 

    233. Another thing 

    234. Another thing 

    235. Another thing 

    236. Another thing 

    237. Another thing 

    238. Another thing 

    239. Another thing 

    240. Another thing 

    241. Another thing 

    242. Another thing 

    243. Another thing 

    244. Another thing 

    245. Another thing 

    246. Another thing 

    247. Another thing 

    248. Another thing 

    249. Another thing 

    250. Another thing 

    251. Another thing 

    252. Another thing 

    253. Another thing 

    254. Another thing 

    255. Another thing 

    256. Another thing 

    257. Another thing 

    258. Another thing 

    259. Another thing 

    260. Another thing 

    261. Another thing 

    262. Another thing 

    263. Another thing 

    264. Another thing 

    265. Another thing 

    266. Another thing 

    267. Another thing 

    268. Another thing 

    269. Another thing 

    270. Another thing 

    271. Another thing 

    272. Another thing 

    273. Another thing 

    274. Another thing 

    275. Another thing 

    276. Another thing 

    277. Another thing 

    278. Another thing 

    279. Another thing 

    280. Another thing 

    281. Another thing 

    282. Another thing 

    283. Another thing 

    284. Another thing 

    285. Another thing 

    286. Another thing 

    287. Another thing 

    288. Another thing 

    289. Another thing 

    290. Another thing 

    291. Another thing 

    292. Another thing 

    293. Another thing 

    294. Another thing 

    295. Another thing 

    296. Another thing 

    297. Another thing 

    298. Another thing 

    299. Another thing 

    300. Another thing 

    301. Another thing 

    302. Another thing 

    303. Another thing 

    304. Another thing 

    305. Another thing 

    306. Another thing 

    307. Another thing 

    308. Another thing 

    309. Another thing 

    310. Another thing 

    311. Another thing 

    312. Another thing 

    313. Another thing 

    314. Another thing 

    315. Another thing 

    316. Another thing 

    317. Another thing 

    318. Another thing 

    319. Another thing 

    320. Another thing 

    321. Another thing 

    322. Another thing 

    323. Another thing 

    324. Another thing 

    325. Another thing 

    326. Another thing 

    327. Another thing 

    328. Another thing 

    329. Another thing 

    330. Another thing 

    331. Another thing 

    332. Another thing 

    333. Another thing 

    334. Another thing 

    335. Another thing 

    336. Another thing 

    337. Another thing 

    338. Another thing 

    339. Another thing 

    340. Another thing 

    341. Another thing 

    342. Another thing 

    343. Another thing 

    344. Another thing 

    345. Another thing 

    346. Another thing 

    347. Another thing 

    348. Another thing 

    349. Another thing 

    350. Another thing 

    351. Another thing 

    352. Another thing 

    353. Another thing 

    354. Another thing 

    355. Another thing 

    356. Another thing 

    357. Another thing 

    358. Another thing 

    359. Another thing 

    360. Another thing 

    361. Another thing 

    362. Another thing 

    363. Another thing 

    364. Another thing 

    365. Another thing 

    366. Another thing 

    367. Another thing 

    368. Another thing 

    369. Another thing 

    370. Another thing 

    371. Another thing 

    372. Another thing 

    373. Another thing 

    374. Another thing 

    375. Another thing 

    376. Another thing 

    377. Another thing 

    378. Another thing 

    379. Another thing 

    380. Another thing 

    381. Another thing 

    382. Another thing 

    383. Another thing 

    384. Another thing 

    385. Another thing 

    386. Another thing 

    387. Another thing 

    388. Another thing 

    389. Another thing 

    390. Another thing 

    391. Another thing 

    392. Another thing 

    393. Another thing 

    394. Another thing 

    395. Another thing 

    396. Another thing 

    397. Another thing 

    398. Another thing 

    399. Another thing 

    400. Another thing 

    401. Another thing 

    402. Another thing 

    403. Another thing 

    404. Another thing 

    405. Another thing 

    406. Another thing 

    407. Another thing 

    408. Another thing 

    409. Another thing 

    410. Another thing 

    411. Another thing 

    412. Another thing 

    413. Another thing 

    414. Another thing 

    415. Another thing 

    416. Another thing 

    417. Another thing 

    418. Another thing 

    419. Another thing 

    420. Another thing 

    421. Another thing 

    422. Another thing 

    423. Another thing 

    424. Another thing 

    425. Another thing 

    426. Another thing 

    427. Another thing 

    428. Another thing 

    429. Another thing 

    430. Another thing 

    431. Another thing 

    432. Another thing 

    433. Another thing 

    434. Another thing 

    435. Another thing 

    436. Another thing 

    437. Another thing 

    438. Another thing 

    439. Another thing 

    440. Another thing 

    441. Another thing 

    442. Another thing 

    443. Another thing 

    444. Another thing 

    445. Another thing 

    446. Another thing 

    447. Another thing 

    448. Another thing 

    449. Another thing 

    450. Another thing 

    451. Another thing 

    452. Another thing 

    453. Another thing 

    454. Another thing 

    455. Another thing 

    456. Another thing 

    457. Another thing 

    458. Another thing 

    459. Another thing 

    460. Another thing 

    461. Another thing 

    462. Another thing 

    463. Another thing 

    464. Another thing 

    465. Another thing 

    466. Another thing 

    467. Another thing 

    468. Another thing 

    469. Another thing 

    470. Another thing 

    471. Another thing 

    472. Another thing 

    473. Another thing 

    474. Another thing 

    475. Another thing 

    476. Another thing 

    477. Another thing 

    478. Another thing 

    479. Another thing 

    480. Another thing 

    481. Another thing 

    482. Another thing 

    483. Another thing 

    484. Another thing 

    485. Another thing 

    486. Another thing 

    487. Another thing 

    488. Another thing 

    489. Another thing 

    490. Another thing 

    491. Another thing 

    492. Another thing 

    493. Another thing 

    494. Another thing 

    495. Another thing 

    496. Another thing 

    497. Another thing 

    498. Another thing 

    499. Another thing 

    500. Another thing 

    501. Another thing 

    502. Another thing 

    503. Another thing 

    504. Another thing 

    505. Another thing 

    506. Another thing 

    507. Another thing 

    508. Another thing 

    509. Another thing 

    510. Another thing 

    511. Another thing 

    512. Another thing 

    513. Another thing 

    514. Another thing 

    515. Another thing 

    516. Another thing 

    517. Another thing 

    518. Another thing 

    519. Another thing 

    520. Another thing 

    521. Another thing 

    522. Another thing 

    523. Another thing 

    524. Another thing 

    525. Another thing 

    526. Another thing 

    527. Another thing 

    528. Another thing 

    529. Another thing 

    530. Another thing 

    531. Another thing 

    532. Another thing 

    533. Another thing 

    534. Another thing 

    535. Another thing 

    536. Another thing 

    537. Another thing 

    538. Another thing 

    539. Another thing 

    540. Another thing 

    541. Another thing 

    542. Another thing 

    543. Another thing 

    544. Another thing 

    545. Another thing 

    546. Another thing 

    547. Another thing 

    548. Another thing 

    549. Another thing 

    550. Another thing 

    551. Another thing 

    552. Another thing 

    553. Another thing 

    554. Another thing 

    555. Another thing 

    556. Another thing 

    557. Another thing 

    558. Another thing 

    559. Another thing 

    560. Another thing 

    561. Another thing 

    562. Another thing 

    563. Another thing 

    564. Another thing 

    565. Another thing 

    566. Another thing 

    567. Another thing 

    568. Another thing 

    569. Another thing 

    570. Another thing 

    571. Another thing 

    572. Another thing 

    573. Another thing 

    574. Another thing 

    575. Another thing 

    576. Another thing 

    577. Another thing 

    578. Another thing 

    579. Another thing 

    580. Another thing 

    581. Another thing 

    582. Another thing 

    583. Another thing 

    584. Another thing 

    585. Another thing 

    586. Another thing 

    587. Another thing 

    588. Another thing 

    589. Another thing 

    590. Another thing 

    591. Another thing 

    592. Another thing 

    593. Another thing 

    594. Another thing 

    595. Another thing 

    596. Another thing 

    597. Another thing 

    598. Another thing 

    599. Another thing 

    600. Another thing 

    601. Another thing 

    602. Another thing 

    603. Another thing 

    604. Another thing 

    605. Another thing 

    606. Another thing 

    607. Another thing 

    608. Another thing 

    609. Another thing 

    610. Another thing 

    611. Another thing 

    612. Another thing 

    613. Another thing 

    614. Another thing 

    615. Another thing 

    616. Another thing 

    617. Another thing 

    618. Another thing 

    619. Another thing 

    620. Another thing 

    621. Another thing 

    622. Another thing 

    623. Another thing 

    624. Another thing 

    625. Another thing 

    626. Another thing 

    627. Another thing 

    628. Another thing 

    629. Another thing 

    630. Another thing 

    631. Another thing 

    632. Another thing 

    633. Another thing 

    634. Another thing 

    635. Another thing 

    636. Another thing 

    637. Another thing 

    638. Another thing 

    639. Another thing 

    640. Another thing 

    641. Another thing 

    642. Another thing 

    643. Another thing 

    644. Another thing 

    645. Another thing 

    646. Another thing 

    647. Another thing 

    648. Another thing 

    649. Another thing 

    650. Another thing 

    651. Another thing 

    652. Another thing 

    653. Another thing 

    654. Another thing 

    655. Another thing 

    656. Another thing 

    657. Another thing 

    658. Another thing 

    659. Another thing 

    660. Another thing 

    661. Another thing 

    662. Another thing 

    663. Another thing 

    664. Another thing 

    665. Another thing 

    666. Another thing 

    667. Another thing 

    668. Another thing 

    669. Another thing 

    670. Another thing 

    671. Another thing 

    672. Another thing 

    673. Another thing 

    674. Another thing 

    675. Another thing 

    676. Another thing 

    677. Another thing 

    678. Another thing 

    679. Another thing 

    680. Another thing 

    681. Another thing 

    682. Another thing 

    683. Another thing 

    684. Another thing 

    685. Another thing 

    686. Another thing 

    687. Another thing 

    688. Another thing 

    689. Another thing 

    690. Another thing 

    691. Another thing 

    692. Another thing 

    693. Another thing 

    694. Another thing 

    695. Another thing 

    696. Another thing 

    697. Another thing 

    698. Another thing 

    699. Another thing 

    700. Another thing 

    701. Another thing 

    702. Another thing 

    703. Another thing 

    704. Another thing 

    705. Another thing 

    706. Another thing 

    707. Another thing 

    708. Another thing 

    709. Another thing 

    710. Another thing 

    711. Another thing 

    712. Another thing 

    713. Another thing 

    714. Another thing 

    715. Another thing 

    716. Another thing 

    717. Another thing 

    718. Another thing 

    719. Another thing 

    720. Another thing 

    721. Another thing 

    722. Another thing 

    723. Another thing 

    724. Another thing 

    725. Another thing 

    726. Another thing 

    727. Another thing 

    728. Another thing 

    729. Another thing 

    730. Another thing 

    731. Another thing 

    732. Another thing 

    733. Another thing 

    734. Another thing 

    735. Another thing 

    736. Another thing 

    737. Another thing 

    738. Another thing 

    739. Another thing 

    740. Another thing 

    741. Another thing 

    742. Another thing 

    743. Another thing 

    744. Another thing 

    745. Another thing 

    746. Another thing 

    747. Another thing 

    748. Another thing 

    749. Another thing 

    750. Another thing 

    751. Another thing 

    752. Another thing 

    753. Another thing 

    754. Another thing 

    755. Another thing 

    756. Another thing 

    757. Another thing 

    758. Another thing 

    759. Another thing 

    760. Another thing 

    761. Another thing 

    762. Another thing 

    763. Another thing 

    764. Another thing 

    765. Another thing 

    766. Another thing 

    767. Another thing 

    768. Another thing 

    769. Another thing 

    770. Another thing 

    771. Another thing 

    772. Another thing 

    773. Another thing 

    774. Another thing 

    775. Another thing 

    776. Another thing 

    777. Another thing 

    778. Another thing 

    779. Another thing 

    780. Another thing 

    781. Another thing 

    782. Another thing 

    783. Another thing 

    784. Another thing 

    785. Another thing 

    786. Another thing 

    787. Another thing 

    788. Another thing 

    789. Another thing 

    790. Another thing 

    791. Another thing 

    792. Another thing 

    793. Another thing 

    794. Another thing 

    795. Another thing 

    796. Another thing 

    797. Another thing 

    798. Another thing 

    799. Another thing 

    800. Another thing 

    801. Another thing 

    802. Another thing 

    803. Another thing 

    804. Another thing 

    805. Another thing 

    806. Another thing 

    807. Another thing 

    808. Another thing 

    809. Another thing 

    810. Another thing 

    811. Another thing 

    812. Another thing 

    813. Another thing 

    814. Another thing 

    815. Another thing 

    816. Another thing 

    817. Another thing 

    818. Another thing 

    819. Another thing 

    820. Another thing 

    821. Another thing 

    822. Another thing 

    823. Another thing 

    824. Another thing 

    825. Another thing 

    826. Another thing 

    827. Another thing 

    828. Another thing 

    829. Another thing 

    830. Another thing 

    831. Another thing 

    832. Another thing 

    833. Another thing 

    834. Another thing 

    835. Another thing 

    836. Another thing 

    837. Another thing 

    838. Another thing 

    839. Another thing 

    840. Another thing 

    841. Another thing 

    842. Another thing 

    843. Another thing 

    844. Another thing 

    845. Another thing 

    846. Another thing 

    847. Another thing 

    848. Another thing 

    849. Another thing 

    850. Another thing 

    851. Another thing 

    852. Another thing 

    853. Another thing 

    854. Another thing 

    855. Another thing 

    856. Another thing 

    857. Another thing 

    858. Another thing 

    859. Another thing 

    860. Another thing 

    861. Another thing 

    862. Another thing 

    863. Another thing 

    864. Another thing 

    865. Another thing 

    866. Another thing 

    867. Another thing 

    868. Another thing 

    869. Another thing 

    870. Another thing 

    871. Another thing 

    872. Another thing 

    873. Another thing 

    874. Another thing 

    875. Another thing 

    876. Another thing 

    877. Another thing 

    878. Another thing 

    879. Another thing 

    880. Another thing 

    881. Another thing 

    882. Another thing 

    883. Another thing 

    884. Another thing 

    885. Another thing 

    886. Another thing 

    887. Another thing 

    888. Another thing 

    889. Another thing 

    890. Another thing 

    891. Another thing 

    892. Another thing 

    893. Another thing 

    894. Another thing 

    895. Another thing 

    896. Another thing 

    897. Another thing 

    898. Another thing 

    899. Another thing 

    900. Another thing 

    901. Another thing 

    902. Another thing 

    903. Another thing 

    904. Another thing 

    905. Another thing 

    906. Another thing 

    907. Another thing 

    908. Another thing 

    909. Another thing 

    910. Another thing 

    911. Another thing 

    912. Another thing 

    913. Another thing 

    914. Another thing 

    915. Another thing 

    916. Another thing 

    917. Another thing 

    918. Another thing 

    919. Another thing 

    920. Another thing 

    921. Another thing 

    922. Another thing 

    923. Another thing 

    924. Another thing 

    925. Another thing 

    926. Another thing 

    927. Another thing 

    928. Another thing 

    929. Another thing 

    930. Another thing 

    931. Another thing 

    932. Another thing 

    933. Another thing 

    934. Another thing 

    935. Another thing 

    936. Another thing 

    937. Another thing 

    938. Another thing 

    939. Another thing 

    940. Another thing 

    941. Another thing 

    942. Another thing 

    943. Another thing 

    944. Another thing 

    945. Another thing 

    946. Another thing 

    947. Another thing 

    948. Another thing 

    949. Another thing 

    950. Another thing 

    951. Another thing 

    952. Another thing 

    953. Another thing 

    954. Another thing 

    955. Another thing 

    956. Another thing 

    957. Another thing 

    958. Another thing 

    959. Another thing 

    960. Another thing 

    961. Another thing 

    962. Another thing 

    963. Another thing 

    964. Another thing 

    965. Another thing 

    966. Another thing 

    967. Another thing 

    968. Another thing 

    969. Another thing 

    970. Another thing 

    971. Another thing 

    972. Another thing 

    973. Another thing 

    974. Another thing 

    975. Another thing 

    976. Another thing 

    977. Another thing 

    978. Another thing 

    979. Another thing 

    980. Another thing 

    981. Another thing 

    982. Another thing 

    983. Another thing 

    984. Another thing 

    985. Another thing 

    986. Another thing 

    987. Another thing 

    988. Another thing 

    989. Another thing 

    990. Another thing 

    991. Another thing 

    992. Another thing 

    993. Another thing 

    994. Another thing 

    995. Another thing 

    996. Another thing 

    997. Another thing 

    998. Another thing 

    999. Another thing 

    1000. Another thing 

    1001. Another thing 

    1002. Another thing 

    1003. Another thing 

    1004. Another thing 

    1005. Another thing 

    1006. Another thing 

    1007. Another thing 

    1008. Another thing 

    1009. Another thing 

    1010. Another thing 

    1011. Another thing 

    1012. Another thing 

    1013. Another thing 

    1014. Another thing 

    1015. Another thing 

    1016. Another thing 

    1017. Another thing 

    1018. Another thing 

    1019. Another thing 

    1020. Another thing 

    1021. Another thing 

    1022. Another thing 

    1023. Another thing 

    1024. Another thing 

    1025. Another thing 

    1026. Another thing 

    1027. Another thing 

    1028. Another thing 

    1029. Another thing 

    1030. Another thing 

    1031. Another thing 

    1032. Another thing 

    1033. Another thing 

    1034. Another thing 

    1035. Another thing 

    1036. Another thing 

    1037. Another thing 

    1038. Another thing 

    1039. Another thing 

    1040. Another thing 

    1041. Another thing 

    1042. Another thing 

    1043. Another thing 

    1044. Another thing 

    1045. Another thing 

    1046. Another thing 

    1047. Another thing 

    1048. Another thing 

    1049. Another thing 

    1050. Another thing 

    1051. Another thing 

    1052. Another thing 

    1053. Another thing 

    1054. Another thing 

    1055. Another thing 

    1056. Another thing 

    1057. Another thing 

    1058. Another thing 

    1059. Another thing 

    1060. Another thing 

    1061. Another thing 

    1062. Another thing 

    1063. Another thing 

    1064. Another thing 

    1065. Another thing 

    1066. Another thing 

    1067. Another thing 

    1068. Another thing 

    1069. Another thing 

    1070. Another thing 

    1071. Another thing 

    1072. Another thing 

    1073. Another thing 

    1074. Another thing 

    1075. Another thing 

    1076. Another thing 

    1077. Another thing 

    1078. Another thing 

    1079. Another thing 

    1080. Another thing 

    1081. Another thing 

    1082. Another thing 

    1083. Another thing 

    1084. Another thing 

    1085. Another thing 

    1086. Another thing 

    1087. Another thing 

    1088. Another thing 

    1089. Another thing 

    1090. Another thing 

    1091. Another thing 

    1092. Another thing 

    1093. Another thing 

    1094. Another thing 

    1095. Another thing 

    1096. Another thing 

    1097. Another thing 

    1098. Another thing 

    1099. Another thing 

    1100. Another thing 

    1101. Another thing 

    1102. Another thing 

    1103. Another thing 

    1104. Another thing 

    1105. Another thing 

    1106. Another thing 

    1107. Another thing 

    1108. Another thing 

    1109. Another thing 

    1110. Another thing 

    1111. Another thing 

    1112. Another thing 

    1113. Another thing 

    1114. Another thing 

    1115. Another thing 

    1116. Another thing 

    1117. Another thing 

    1118. Another thing 

    1119. Another thing 

    1120. Another thing 

    1121. Another thing 

    1122. Another thing 

    1123. Another thing 

    1124. Another thing 

    1125. Another thing 

    1126. Another thing 

    1127. Another thing 

    1128. Another thing 

    1129. Another thing 

    1130. Another thing 

    1131. Another thing 

    1132. Another thing 

    1133. Another thing 

    1134. Another thing 

    1135. Another thing 

    1136. Another thing 

    1137. Another thing 

    1138. Another thing 

    1139. Another thing 

    1140. Another thing 

    1141. Another thing 

    1142. Another thing 

    1143. Another thing 

    1144. Another thing 

    1145. Another thing 

    1146. Another thing 

    1147. Another thing 

    1148. Another thing 

    1149. Another thing 

    1150. Another thing 

    1151. Another thing 

    1152. Another thing 

    1153. Another thing 

    1154. Another thing 

    1155. Another thing 

    1156. Another thing 

    1157. Another thing 

    1158. Another thing 

    1159. Another thing 

    1160. Another thing 

    1161. Another thing 

    1162. Another thing 

    1163. Another thing 

    1164. Another thing 

    1165. Another thing 

    1166. Another thing 

    1167. Another thing 

    1168. Another thing 

    1169. Another thing 

    1170. Another thing 

    1171. Another thing 

    1172. Another thing 

    1173. Another thing 

    1174. Another thing 

    1175. Another thing 

    1176. Another thing 

    1177. Another thing 

    1178. Another thing 

    1179. Another thing 

    1180. Another thing 

    1181. Another thing 

    1182. Another thing 

    1183. Another thing 

    1184. Another thing 

    1185. Another thing 

    1186. Another thing 

    1187. Another thing 

    1188. Another thing 

    1189. Another thing 

    1190. Another thing 

    1191. Another thing 

    1192. Another thing 

    1193. Another thing 

    1194. Another thing 

    1195. Another thing 

    1196. Another thing 

    1197. Another thing 

    1198. Another thing 

    1199. Another thing 

    Markdown-2.6.9/tests/extensions/extra/footnote_many_footnotes.txt0000644000076500000240000013602013064117426026144 0ustar waylanstaff00000000000000Something[^1] Something[^2] Something[^3] Something[^4] Something[^5] Something[^6] Something[^7] Something[^8] Something[^9] Something[^10] Something[^11] Something[^12] Something[^13] Something[^14] Something[^15] Something[^16] Something[^17] Something[^18] Something[^19] Something[^20] Something[^21] Something[^22] Something[^23] Something[^24] Something[^25] Something[^26] Something[^27] Something[^28] Something[^29] Something[^30] Something[^31] Something[^32] Something[^33] Something[^34] Something[^35] Something[^36] Something[^37] Something[^38] Something[^39] Something[^40] Something[^41] Something[^42] Something[^43] Something[^44] Something[^45] Something[^46] Something[^47] Something[^48] Something[^49] Something[^50] Something[^51] Something[^52] Something[^53] Something[^54] Something[^55] Something[^56] Something[^57] Something[^58] Something[^59] Something[^60] Something[^61] Something[^62] Something[^63] Something[^64] Something[^65] Something[^66] Something[^67] Something[^68] Something[^69] Something[^70] Something[^71] Something[^72] Something[^73] Something[^74] Something[^75] Something[^76] Something[^77] Something[^78] Something[^79] Something[^80] Something[^81] Something[^82] Something[^83] Something[^84] Something[^85] Something[^86] Something[^87] Something[^88] Something[^89] Something[^90] Something[^91] Something[^92] Something[^93] Something[^94] Something[^95] Something[^96] Something[^97] Something[^98] Something[^99] Something[^100] Something[^101] Something[^102] Something[^103] Something[^104] Something[^105] Something[^106] Something[^107] Something[^108] Something[^109] Something[^110] Something[^111] Something[^112] Something[^113] Something[^114] Something[^115] Something[^116] Something[^117] Something[^118] Something[^119] Something[^120] Something[^121] Something[^122] Something[^123] Something[^124] Something[^125] Something[^126] Something[^127] Something[^128] Something[^129] Something[^130] Something[^131] Something[^132] Something[^133] Something[^134] Something[^135] Something[^136] Something[^137] Something[^138] Something[^139] Something[^140] Something[^141] Something[^142] Something[^143] Something[^144] Something[^145] Something[^146] Something[^147] Something[^148] Something[^149] Something[^150] Something[^151] Something[^152] Something[^153] Something[^154] Something[^155] Something[^156] Something[^157] Something[^158] Something[^159] Something[^160] Something[^161] Something[^162] Something[^163] Something[^164] Something[^165] Something[^166] Something[^167] Something[^168] Something[^169] Something[^170] Something[^171] Something[^172] Something[^173] Something[^174] Something[^175] Something[^176] Something[^177] Something[^178] Something[^179] Something[^180] Something[^181] Something[^182] Something[^183] Something[^184] Something[^185] Something[^186] Something[^187] Something[^188] Something[^189] Something[^190] Something[^191] Something[^192] Something[^193] Something[^194] Something[^195] Something[^196] Something[^197] Something[^198] Something[^199] Something[^200] Something[^201] Something[^202] Something[^203] Something[^204] Something[^205] Something[^206] Something[^207] Something[^208] Something[^209] Something[^210] Something[^211] Something[^212] Something[^213] Something[^214] Something[^215] Something[^216] Something[^217] Something[^218] Something[^219] Something[^220] Something[^221] Something[^222] Something[^223] Something[^224] Something[^225] Something[^226] Something[^227] Something[^228] Something[^229] Something[^230] Something[^231] Something[^232] Something[^233] Something[^234] Something[^235] Something[^236] Something[^237] Something[^238] Something[^239] Something[^240] Something[^241] Something[^242] Something[^243] Something[^244] Something[^245] Something[^246] Something[^247] Something[^248] Something[^249] Something[^250] Something[^251] Something[^252] Something[^253] Something[^254] Something[^255] Something[^256] Something[^257] Something[^258] Something[^259] Something[^260] Something[^261] Something[^262] Something[^263] Something[^264] Something[^265] Something[^266] Something[^267] Something[^268] Something[^269] Something[^270] Something[^271] Something[^272] Something[^273] Something[^274] Something[^275] Something[^276] Something[^277] Something[^278] Something[^279] Something[^280] Something[^281] Something[^282] Something[^283] Something[^284] Something[^285] Something[^286] Something[^287] Something[^288] Something[^289] Something[^290] Something[^291] Something[^292] Something[^293] Something[^294] Something[^295] Something[^296] Something[^297] Something[^298] Something[^299] Something[^300] Something[^301] Something[^302] Something[^303] Something[^304] Something[^305] Something[^306] Something[^307] Something[^308] Something[^309] Something[^310] Something[^311] Something[^312] Something[^313] Something[^314] Something[^315] Something[^316] Something[^317] Something[^318] Something[^319] Something[^320] Something[^321] Something[^322] Something[^323] Something[^324] Something[^325] Something[^326] Something[^327] Something[^328] Something[^329] Something[^330] Something[^331] Something[^332] Something[^333] Something[^334] Something[^335] Something[^336] Something[^337] Something[^338] Something[^339] Something[^340] Something[^341] Something[^342] Something[^343] Something[^344] Something[^345] Something[^346] Something[^347] Something[^348] Something[^349] Something[^350] Something[^351] Something[^352] Something[^353] Something[^354] Something[^355] Something[^356] Something[^357] Something[^358] Something[^359] Something[^360] Something[^361] Something[^362] Something[^363] Something[^364] Something[^365] Something[^366] Something[^367] Something[^368] Something[^369] Something[^370] Something[^371] Something[^372] Something[^373] Something[^374] Something[^375] Something[^376] Something[^377] Something[^378] Something[^379] Something[^380] Something[^381] Something[^382] Something[^383] Something[^384] Something[^385] Something[^386] Something[^387] Something[^388] Something[^389] Something[^390] Something[^391] Something[^392] Something[^393] Something[^394] Something[^395] Something[^396] Something[^397] Something[^398] Something[^399] Something[^400] Something[^401] Something[^402] Something[^403] Something[^404] Something[^405] Something[^406] Something[^407] Something[^408] Something[^409] Something[^410] Something[^411] Something[^412] Something[^413] Something[^414] Something[^415] Something[^416] Something[^417] Something[^418] Something[^419] Something[^420] Something[^421] Something[^422] Something[^423] Something[^424] Something[^425] Something[^426] Something[^427] Something[^428] Something[^429] Something[^430] Something[^431] Something[^432] Something[^433] Something[^434] Something[^435] Something[^436] Something[^437] Something[^438] Something[^439] Something[^440] Something[^441] Something[^442] Something[^443] Something[^444] Something[^445] Something[^446] Something[^447] Something[^448] Something[^449] Something[^450] Something[^451] Something[^452] Something[^453] Something[^454] Something[^455] Something[^456] Something[^457] Something[^458] Something[^459] Something[^460] Something[^461] Something[^462] Something[^463] Something[^464] Something[^465] Something[^466] Something[^467] Something[^468] Something[^469] Something[^470] Something[^471] Something[^472] Something[^473] Something[^474] Something[^475] Something[^476] Something[^477] Something[^478] Something[^479] Something[^480] Something[^481] Something[^482] Something[^483] Something[^484] Something[^485] Something[^486] Something[^487] Something[^488] Something[^489] Something[^490] Something[^491] Something[^492] Something[^493] Something[^494] Something[^495] Something[^496] Something[^497] Something[^498] Something[^499] Something[^500] Something[^501] Something[^502] Something[^503] Something[^504] Something[^505] Something[^506] Something[^507] Something[^508] Something[^509] Something[^510] Something[^511] Something[^512] Something[^513] Something[^514] Something[^515] Something[^516] Something[^517] Something[^518] Something[^519] Something[^520] Something[^521] Something[^522] Something[^523] Something[^524] Something[^525] Something[^526] Something[^527] Something[^528] Something[^529] Something[^530] Something[^531] Something[^532] Something[^533] Something[^534] Something[^535] Something[^536] Something[^537] Something[^538] Something[^539] Something[^540] Something[^541] Something[^542] Something[^543] Something[^544] Something[^545] Something[^546] Something[^547] Something[^548] Something[^549] Something[^550] Something[^551] Something[^552] Something[^553] Something[^554] Something[^555] Something[^556] Something[^557] Something[^558] Something[^559] Something[^560] Something[^561] Something[^562] Something[^563] Something[^564] Something[^565] Something[^566] Something[^567] Something[^568] Something[^569] Something[^570] Something[^571] Something[^572] Something[^573] Something[^574] Something[^575] Something[^576] Something[^577] Something[^578] Something[^579] Something[^580] Something[^581] Something[^582] Something[^583] Something[^584] Something[^585] Something[^586] Something[^587] Something[^588] Something[^589] Something[^590] Something[^591] Something[^592] Something[^593] Something[^594] Something[^595] Something[^596] Something[^597] Something[^598] Something[^599] Something[^600] Something[^601] Something[^602] Something[^603] Something[^604] Something[^605] Something[^606] Something[^607] Something[^608] Something[^609] Something[^610] Something[^611] Something[^612] Something[^613] Something[^614] Something[^615] Something[^616] Something[^617] Something[^618] Something[^619] Something[^620] Something[^621] Something[^622] Something[^623] Something[^624] Something[^625] Something[^626] Something[^627] Something[^628] Something[^629] Something[^630] Something[^631] Something[^632] Something[^633] Something[^634] Something[^635] Something[^636] Something[^637] Something[^638] Something[^639] Something[^640] Something[^641] Something[^642] Something[^643] Something[^644] Something[^645] Something[^646] Something[^647] Something[^648] Something[^649] Something[^650] Something[^651] Something[^652] Something[^653] Something[^654] Something[^655] Something[^656] Something[^657] Something[^658] Something[^659] Something[^660] Something[^661] Something[^662] Something[^663] Something[^664] Something[^665] Something[^666] Something[^667] Something[^668] Something[^669] Something[^670] Something[^671] Something[^672] Something[^673] Something[^674] Something[^675] Something[^676] Something[^677] Something[^678] Something[^679] Something[^680] Something[^681] Something[^682] Something[^683] Something[^684] Something[^685] Something[^686] Something[^687] Something[^688] Something[^689] Something[^690] Something[^691] Something[^692] Something[^693] Something[^694] Something[^695] Something[^696] Something[^697] Something[^698] Something[^699] Something[^700] Something[^701] Something[^702] Something[^703] Something[^704] Something[^705] Something[^706] Something[^707] Something[^708] Something[^709] Something[^710] Something[^711] Something[^712] Something[^713] Something[^714] Something[^715] Something[^716] Something[^717] Something[^718] Something[^719] Something[^720] Something[^721] Something[^722] Something[^723] Something[^724] Something[^725] Something[^726] Something[^727] Something[^728] Something[^729] Something[^730] Something[^731] Something[^732] Something[^733] Something[^734] Something[^735] Something[^736] Something[^737] Something[^738] Something[^739] Something[^740] Something[^741] Something[^742] Something[^743] Something[^744] Something[^745] Something[^746] Something[^747] Something[^748] Something[^749] Something[^750] Something[^751] Something[^752] Something[^753] Something[^754] Something[^755] Something[^756] Something[^757] Something[^758] Something[^759] Something[^760] Something[^761] Something[^762] Something[^763] Something[^764] Something[^765] Something[^766] Something[^767] Something[^768] Something[^769] Something[^770] Something[^771] Something[^772] Something[^773] Something[^774] Something[^775] Something[^776] Something[^777] Something[^778] Something[^779] Something[^780] Something[^781] Something[^782] Something[^783] Something[^784] Something[^785] Something[^786] Something[^787] Something[^788] Something[^789] Something[^790] Something[^791] Something[^792] Something[^793] Something[^794] Something[^795] Something[^796] Something[^797] Something[^798] Something[^799] Something[^800] Something[^801] Something[^802] Something[^803] Something[^804] Something[^805] Something[^806] Something[^807] Something[^808] Something[^809] Something[^810] Something[^811] Something[^812] Something[^813] Something[^814] Something[^815] Something[^816] Something[^817] Something[^818] Something[^819] Something[^820] Something[^821] Something[^822] Something[^823] Something[^824] Something[^825] Something[^826] Something[^827] Something[^828] Something[^829] Something[^830] Something[^831] Something[^832] Something[^833] Something[^834] Something[^835] Something[^836] Something[^837] Something[^838] Something[^839] Something[^840] Something[^841] Something[^842] Something[^843] Something[^844] Something[^845] Something[^846] Something[^847] Something[^848] Something[^849] Something[^850] Something[^851] Something[^852] Something[^853] Something[^854] Something[^855] Something[^856] Something[^857] Something[^858] Something[^859] Something[^860] Something[^861] Something[^862] Something[^863] Something[^864] Something[^865] Something[^866] Something[^867] Something[^868] Something[^869] Something[^870] Something[^871] Something[^872] Something[^873] Something[^874] Something[^875] Something[^876] Something[^877] Something[^878] Something[^879] Something[^880] Something[^881] Something[^882] Something[^883] Something[^884] Something[^885] Something[^886] Something[^887] Something[^888] Something[^889] Something[^890] Something[^891] Something[^892] Something[^893] Something[^894] Something[^895] Something[^896] Something[^897] Something[^898] Something[^899] Something[^900] Something[^901] Something[^902] Something[^903] Something[^904] Something[^905] Something[^906] Something[^907] Something[^908] Something[^909] Something[^910] Something[^911] Something[^912] Something[^913] Something[^914] Something[^915] Something[^916] Something[^917] Something[^918] Something[^919] Something[^920] Something[^921] Something[^922] Something[^923] Something[^924] Something[^925] Something[^926] Something[^927] Something[^928] Something[^929] Something[^930] Something[^931] Something[^932] Something[^933] Something[^934] Something[^935] Something[^936] Something[^937] Something[^938] Something[^939] Something[^940] Something[^941] Something[^942] Something[^943] Something[^944] Something[^945] Something[^946] Something[^947] Something[^948] Something[^949] Something[^950] Something[^951] Something[^952] Something[^953] Something[^954] Something[^955] Something[^956] Something[^957] Something[^958] Something[^959] Something[^960] Something[^961] Something[^962] Something[^963] Something[^964] Something[^965] Something[^966] Something[^967] Something[^968] Something[^969] Something[^970] Something[^971] Something[^972] Something[^973] Something[^974] Something[^975] Something[^976] Something[^977] Something[^978] Something[^979] Something[^980] Something[^981] Something[^982] Something[^983] Something[^984] Something[^985] Something[^986] Something[^987] Something[^988] Something[^989] Something[^990] Something[^991] Something[^992] Something[^993] Something[^994] Something[^995] Something[^996] Something[^997] Something[^998] Something[^999] Something[^1000] Something[^1001] Something[^1002] Something[^1003] Something[^1004] Something[^1005] Something[^1006] Something[^1007] Something[^1008] Something[^1009] Something[^1010] Something[^1011] Something[^1012] Something[^1013] Something[^1014] Something[^1015] Something[^1016] Something[^1017] Something[^1018] Something[^1019] Something[^1020] Something[^1021] Something[^1022] Something[^1023] Something[^1024] Something[^1025] Something[^1026] Something[^1027] Something[^1028] Something[^1029] Something[^1030] Something[^1031] Something[^1032] Something[^1033] Something[^1034] Something[^1035] Something[^1036] Something[^1037] Something[^1038] Something[^1039] Something[^1040] Something[^1041] Something[^1042] Something[^1043] Something[^1044] Something[^1045] Something[^1046] Something[^1047] Something[^1048] Something[^1049] Something[^1050] Something[^1051] Something[^1052] Something[^1053] Something[^1054] Something[^1055] Something[^1056] Something[^1057] Something[^1058] Something[^1059] Something[^1060] Something[^1061] Something[^1062] Something[^1063] Something[^1064] Something[^1065] Something[^1066] Something[^1067] Something[^1068] Something[^1069] Something[^1070] Something[^1071] Something[^1072] Something[^1073] Something[^1074] Something[^1075] Something[^1076] Something[^1077] Something[^1078] Something[^1079] Something[^1080] Something[^1081] Something[^1082] Something[^1083] Something[^1084] Something[^1085] Something[^1086] Something[^1087] Something[^1088] Something[^1089] Something[^1090] Something[^1091] Something[^1092] Something[^1093] Something[^1094] Something[^1095] Something[^1096] Something[^1097] Something[^1098] Something[^1099] Something[^1100] Something[^1101] Something[^1102] Something[^1103] Something[^1104] Something[^1105] Something[^1106] Something[^1107] Something[^1108] Something[^1109] Something[^1110] Something[^1111] Something[^1112] Something[^1113] Something[^1114] Something[^1115] Something[^1116] Something[^1117] Something[^1118] Something[^1119] Something[^1120] Something[^1121] Something[^1122] Something[^1123] Something[^1124] Something[^1125] Something[^1126] Something[^1127] Something[^1128] Something[^1129] Something[^1130] Something[^1131] Something[^1132] Something[^1133] Something[^1134] Something[^1135] Something[^1136] Something[^1137] Something[^1138] Something[^1139] Something[^1140] Something[^1141] Something[^1142] Something[^1143] Something[^1144] Something[^1145] Something[^1146] Something[^1147] Something[^1148] Something[^1149] Something[^1150] Something[^1151] Something[^1152] Something[^1153] Something[^1154] Something[^1155] Something[^1156] Something[^1157] Something[^1158] Something[^1159] Something[^1160] Something[^1161] Something[^1162] Something[^1163] Something[^1164] Something[^1165] Something[^1166] Something[^1167] Something[^1168] Something[^1169] Something[^1170] Something[^1171] Something[^1172] Something[^1173] Something[^1174] Something[^1175] Something[^1176] Something[^1177] Something[^1178] Something[^1179] Something[^1180] Something[^1181] Something[^1182] Something[^1183] Something[^1184] Something[^1185] Something[^1186] Something[^1187] Something[^1188] Something[^1189] Something[^1190] Something[^1191] Something[^1192] Something[^1193] Something[^1194] Something[^1195] Something[^1196] Something[^1197] Something[^1198] Something[^1199] [^1]: Another thing [^2]: Another thing [^3]: Another thing [^4]: Another thing [^5]: Another thing [^6]: Another thing [^7]: Another thing [^8]: Another thing [^9]: Another thing [^10]: Another thing [^11]: Another thing [^12]: Another thing [^13]: Another thing [^14]: Another thing [^15]: Another thing [^16]: Another thing [^17]: Another thing [^18]: Another thing [^19]: Another thing [^20]: Another thing [^21]: Another thing [^22]: Another thing [^23]: Another thing [^24]: Another thing [^25]: Another thing [^26]: Another thing [^27]: Another thing [^28]: Another thing [^29]: Another thing [^30]: Another thing [^31]: Another thing [^32]: Another thing [^33]: Another thing [^34]: Another thing [^35]: Another thing [^36]: Another thing [^37]: Another thing [^38]: Another thing [^39]: Another thing [^40]: Another thing [^41]: Another thing [^42]: Another thing [^43]: Another thing [^44]: Another thing [^45]: Another thing [^46]: Another thing [^47]: Another thing [^48]: Another thing [^49]: Another thing [^50]: Another thing [^51]: Another thing [^52]: Another thing [^53]: Another thing [^54]: Another thing [^55]: Another thing [^56]: Another thing [^57]: Another thing [^58]: Another thing [^59]: Another thing [^60]: Another thing [^61]: Another thing [^62]: Another thing [^63]: Another thing [^64]: Another thing [^65]: Another thing [^66]: Another thing [^67]: Another thing [^68]: Another thing [^69]: Another thing [^70]: Another thing [^71]: Another thing [^72]: Another thing [^73]: Another thing [^74]: Another thing [^75]: Another thing [^76]: Another thing [^77]: Another thing [^78]: Another thing [^79]: Another thing [^80]: Another thing [^81]: Another thing [^82]: Another thing [^83]: Another thing [^84]: Another thing [^85]: Another thing [^86]: Another thing [^87]: Another thing [^88]: Another thing [^89]: Another thing [^90]: Another thing [^91]: Another thing [^92]: Another thing [^93]: Another thing [^94]: Another thing [^95]: Another thing [^96]: Another thing [^97]: Another thing [^98]: Another thing [^99]: Another thing [^100]: Another thing [^101]: Another thing [^102]: Another thing [^103]: Another thing [^104]: Another thing [^105]: Another thing [^106]: Another thing [^107]: Another thing [^108]: Another thing [^109]: Another thing [^110]: Another thing [^111]: Another thing [^112]: Another thing [^113]: Another thing [^114]: Another thing [^115]: Another thing [^116]: Another thing [^117]: Another thing [^118]: Another thing [^119]: Another thing [^120]: Another thing [^121]: Another thing [^122]: Another thing [^123]: Another thing [^124]: Another thing [^125]: Another thing [^126]: Another thing [^127]: Another thing [^128]: Another thing [^129]: Another thing [^130]: Another thing [^131]: Another thing [^132]: Another thing [^133]: Another thing [^134]: Another thing [^135]: Another thing [^136]: Another thing [^137]: Another thing [^138]: Another thing [^139]: Another thing [^140]: Another thing [^141]: Another thing [^142]: Another thing [^143]: Another thing [^144]: Another thing [^145]: Another thing [^146]: Another thing [^147]: Another thing [^148]: Another thing [^149]: Another thing [^150]: Another thing [^151]: Another thing [^152]: Another thing [^153]: Another thing [^154]: Another thing [^155]: Another thing [^156]: Another thing [^157]: Another thing [^158]: Another thing [^159]: Another thing [^160]: Another thing [^161]: Another thing [^162]: Another thing [^163]: Another thing [^164]: Another thing [^165]: Another thing [^166]: Another thing [^167]: Another thing [^168]: Another thing [^169]: Another thing [^170]: Another thing [^171]: Another thing [^172]: Another thing [^173]: Another thing [^174]: Another thing [^175]: Another thing [^176]: Another thing [^177]: Another thing [^178]: Another thing [^179]: Another thing [^180]: Another thing [^181]: Another thing [^182]: Another thing [^183]: Another thing [^184]: Another thing [^185]: Another thing [^186]: Another thing [^187]: Another thing [^188]: Another thing [^189]: Another thing [^190]: Another thing [^191]: Another thing [^192]: Another thing [^193]: Another thing [^194]: Another thing [^195]: Another thing [^196]: Another thing [^197]: Another thing [^198]: Another thing [^199]: Another thing [^200]: Another thing [^201]: Another thing [^202]: Another thing [^203]: Another thing [^204]: Another thing [^205]: Another thing [^206]: Another thing [^207]: Another thing [^208]: Another thing [^209]: Another thing [^210]: Another thing [^211]: Another thing [^212]: Another thing [^213]: Another thing [^214]: Another thing [^215]: Another thing [^216]: Another thing [^217]: Another thing [^218]: Another thing [^219]: Another thing [^220]: Another thing [^221]: Another thing [^222]: Another thing [^223]: Another thing [^224]: Another thing [^225]: Another thing [^226]: Another thing [^227]: Another thing [^228]: Another thing [^229]: Another thing [^230]: Another thing [^231]: Another thing [^232]: Another thing [^233]: Another thing [^234]: Another thing [^235]: Another thing [^236]: Another thing [^237]: Another thing [^238]: Another thing [^239]: Another thing [^240]: Another thing [^241]: Another thing [^242]: Another thing [^243]: Another thing [^244]: Another thing [^245]: Another thing [^246]: Another thing [^247]: Another thing [^248]: Another thing [^249]: Another thing [^250]: Another thing [^251]: Another thing [^252]: Another thing [^253]: Another thing [^254]: Another thing [^255]: Another thing [^256]: Another thing [^257]: Another thing [^258]: Another thing [^259]: Another thing [^260]: Another thing [^261]: Another thing [^262]: Another thing [^263]: Another thing [^264]: Another thing [^265]: Another thing [^266]: Another thing [^267]: Another thing [^268]: Another thing [^269]: Another thing [^270]: Another thing [^271]: Another thing [^272]: Another thing [^273]: Another thing [^274]: Another thing [^275]: Another thing [^276]: Another thing [^277]: Another thing [^278]: Another thing [^279]: Another thing [^280]: Another thing [^281]: Another thing [^282]: Another thing [^283]: Another thing [^284]: Another thing [^285]: Another thing [^286]: Another thing [^287]: Another thing [^288]: Another thing [^289]: Another thing [^290]: Another thing [^291]: Another thing [^292]: Another thing [^293]: Another thing [^294]: Another thing [^295]: Another thing [^296]: Another thing [^297]: Another thing [^298]: Another thing [^299]: Another thing [^300]: Another thing [^301]: Another thing [^302]: Another thing [^303]: Another thing [^304]: Another thing [^305]: Another thing [^306]: Another thing [^307]: Another thing [^308]: Another thing [^309]: Another thing [^310]: Another thing [^311]: Another thing [^312]: Another thing [^313]: Another thing [^314]: Another thing [^315]: Another thing [^316]: Another thing [^317]: Another thing [^318]: Another thing [^319]: Another thing [^320]: Another thing [^321]: Another thing [^322]: Another thing [^323]: Another thing [^324]: Another thing [^325]: Another thing [^326]: Another thing [^327]: Another thing [^328]: Another thing [^329]: Another thing [^330]: Another thing [^331]: Another thing [^332]: Another thing [^333]: Another thing [^334]: Another thing [^335]: Another thing [^336]: Another thing [^337]: Another thing [^338]: Another thing [^339]: Another thing [^340]: Another thing [^341]: Another thing [^342]: Another thing [^343]: Another thing [^344]: Another thing [^345]: Another thing [^346]: Another thing [^347]: Another thing [^348]: Another thing [^349]: Another thing [^350]: Another thing [^351]: Another thing [^352]: Another thing [^353]: Another thing [^354]: Another thing [^355]: Another thing [^356]: Another thing [^357]: Another thing [^358]: Another thing [^359]: Another thing [^360]: Another thing [^361]: Another thing [^362]: Another thing [^363]: Another thing [^364]: Another thing [^365]: Another thing [^366]: Another thing [^367]: Another thing [^368]: Another thing [^369]: Another thing [^370]: Another thing [^371]: Another thing [^372]: Another thing [^373]: Another thing [^374]: Another thing [^375]: Another thing [^376]: Another thing [^377]: Another thing [^378]: Another thing [^379]: Another thing [^380]: Another thing [^381]: Another thing [^382]: Another thing [^383]: Another thing [^384]: Another thing [^385]: Another thing [^386]: Another thing [^387]: Another thing [^388]: Another thing [^389]: Another thing [^390]: Another thing [^391]: Another thing [^392]: Another thing [^393]: Another thing [^394]: Another thing [^395]: Another thing [^396]: Another thing [^397]: Another thing [^398]: Another thing [^399]: Another thing [^400]: Another thing [^401]: Another thing [^402]: Another thing [^403]: Another thing [^404]: Another thing [^405]: Another thing [^406]: Another thing [^407]: Another thing [^408]: Another thing [^409]: Another thing [^410]: Another thing [^411]: Another thing [^412]: Another thing [^413]: Another thing [^414]: Another thing [^415]: Another thing [^416]: Another thing [^417]: Another thing [^418]: Another thing [^419]: Another thing [^420]: Another thing [^421]: Another thing [^422]: Another thing [^423]: Another thing [^424]: Another thing [^425]: Another thing [^426]: Another thing [^427]: Another thing [^428]: Another thing [^429]: Another thing [^430]: Another thing [^431]: Another thing [^432]: Another thing [^433]: Another thing [^434]: Another thing [^435]: Another thing [^436]: Another thing [^437]: Another thing [^438]: Another thing [^439]: Another thing [^440]: Another thing [^441]: Another thing [^442]: Another thing [^443]: Another thing [^444]: Another thing [^445]: Another thing [^446]: Another thing [^447]: Another thing [^448]: Another thing [^449]: Another thing [^450]: Another thing [^451]: Another thing [^452]: Another thing [^453]: Another thing [^454]: Another thing [^455]: Another thing [^456]: Another thing [^457]: Another thing [^458]: Another thing [^459]: Another thing [^460]: Another thing [^461]: Another thing [^462]: Another thing [^463]: Another thing [^464]: Another thing [^465]: Another thing [^466]: Another thing [^467]: Another thing [^468]: Another thing [^469]: Another thing [^470]: Another thing [^471]: Another thing [^472]: Another thing [^473]: Another thing [^474]: Another thing [^475]: Another thing [^476]: Another thing [^477]: Another thing [^478]: Another thing [^479]: Another thing [^480]: Another thing [^481]: Another thing [^482]: Another thing [^483]: Another thing [^484]: Another thing [^485]: Another thing [^486]: Another thing [^487]: Another thing [^488]: Another thing [^489]: Another thing [^490]: Another thing [^491]: Another thing [^492]: Another thing [^493]: Another thing [^494]: Another thing [^495]: Another thing [^496]: Another thing [^497]: Another thing [^498]: Another thing [^499]: Another thing [^500]: Another thing [^501]: Another thing [^502]: Another thing [^503]: Another thing [^504]: Another thing [^505]: Another thing [^506]: Another thing [^507]: Another thing [^508]: Another thing [^509]: Another thing [^510]: Another thing [^511]: Another thing [^512]: Another thing [^513]: Another thing [^514]: Another thing [^515]: Another thing [^516]: Another thing [^517]: Another thing [^518]: Another thing [^519]: Another thing [^520]: Another thing [^521]: Another thing [^522]: Another thing [^523]: Another thing [^524]: Another thing [^525]: Another thing [^526]: Another thing [^527]: Another thing [^528]: Another thing [^529]: Another thing [^530]: Another thing [^531]: Another thing [^532]: Another thing [^533]: Another thing [^534]: Another thing [^535]: Another thing [^536]: Another thing [^537]: Another thing [^538]: Another thing [^539]: Another thing [^540]: Another thing [^541]: Another thing [^542]: Another thing [^543]: Another thing [^544]: Another thing [^545]: Another thing [^546]: Another thing [^547]: Another thing [^548]: Another thing [^549]: Another thing [^550]: Another thing [^551]: Another thing [^552]: Another thing [^553]: Another thing [^554]: Another thing [^555]: Another thing [^556]: Another thing [^557]: Another thing [^558]: Another thing [^559]: Another thing [^560]: Another thing [^561]: Another thing [^562]: Another thing [^563]: Another thing [^564]: Another thing [^565]: Another thing [^566]: Another thing [^567]: Another thing [^568]: Another thing [^569]: Another thing [^570]: Another thing [^571]: Another thing [^572]: Another thing [^573]: Another thing [^574]: Another thing [^575]: Another thing [^576]: Another thing [^577]: Another thing [^578]: Another thing [^579]: Another thing [^580]: Another thing [^581]: Another thing [^582]: Another thing [^583]: Another thing [^584]: Another thing [^585]: Another thing [^586]: Another thing [^587]: Another thing [^588]: Another thing [^589]: Another thing [^590]: Another thing [^591]: Another thing [^592]: Another thing [^593]: Another thing [^594]: Another thing [^595]: Another thing [^596]: Another thing [^597]: Another thing [^598]: Another thing [^599]: Another thing [^600]: Another thing [^601]: Another thing [^602]: Another thing [^603]: Another thing [^604]: Another thing [^605]: Another thing [^606]: Another thing [^607]: Another thing [^608]: Another thing [^609]: Another thing [^610]: Another thing [^611]: Another thing [^612]: Another thing [^613]: Another thing [^614]: Another thing [^615]: Another thing [^616]: Another thing [^617]: Another thing [^618]: Another thing [^619]: Another thing [^620]: Another thing [^621]: Another thing [^622]: Another thing [^623]: Another thing [^624]: Another thing [^625]: Another thing [^626]: Another thing [^627]: Another thing [^628]: Another thing [^629]: Another thing [^630]: Another thing [^631]: Another thing [^632]: Another thing [^633]: Another thing [^634]: Another thing [^635]: Another thing [^636]: Another thing [^637]: Another thing [^638]: Another thing [^639]: Another thing [^640]: Another thing [^641]: Another thing [^642]: Another thing [^643]: Another thing [^644]: Another thing [^645]: Another thing [^646]: Another thing [^647]: Another thing [^648]: Another thing [^649]: Another thing [^650]: Another thing [^651]: Another thing [^652]: Another thing [^653]: Another thing [^654]: Another thing [^655]: Another thing [^656]: Another thing [^657]: Another thing [^658]: Another thing [^659]: Another thing [^660]: Another thing [^661]: Another thing [^662]: Another thing [^663]: Another thing [^664]: Another thing [^665]: Another thing [^666]: Another thing [^667]: Another thing [^668]: Another thing [^669]: Another thing [^670]: Another thing [^671]: Another thing [^672]: Another thing [^673]: Another thing [^674]: Another thing [^675]: Another thing [^676]: Another thing [^677]: Another thing [^678]: Another thing [^679]: Another thing [^680]: Another thing [^681]: Another thing [^682]: Another thing [^683]: Another thing [^684]: Another thing [^685]: Another thing [^686]: Another thing [^687]: Another thing [^688]: Another thing [^689]: Another thing [^690]: Another thing [^691]: Another thing [^692]: Another thing [^693]: Another thing [^694]: Another thing [^695]: Another thing [^696]: Another thing [^697]: Another thing [^698]: Another thing [^699]: Another thing [^700]: Another thing [^701]: Another thing [^702]: Another thing [^703]: Another thing [^704]: Another thing [^705]: Another thing [^706]: Another thing [^707]: Another thing [^708]: Another thing [^709]: Another thing [^710]: Another thing [^711]: Another thing [^712]: Another thing [^713]: Another thing [^714]: Another thing [^715]: Another thing [^716]: Another thing [^717]: Another thing [^718]: Another thing [^719]: Another thing [^720]: Another thing [^721]: Another thing [^722]: Another thing [^723]: Another thing [^724]: Another thing [^725]: Another thing [^726]: Another thing [^727]: Another thing [^728]: Another thing [^729]: Another thing [^730]: Another thing [^731]: Another thing [^732]: Another thing [^733]: Another thing [^734]: Another thing [^735]: Another thing [^736]: Another thing [^737]: Another thing [^738]: Another thing [^739]: Another thing [^740]: Another thing [^741]: Another thing [^742]: Another thing [^743]: Another thing [^744]: Another thing [^745]: Another thing [^746]: Another thing [^747]: Another thing [^748]: Another thing [^749]: Another thing [^750]: Another thing [^751]: Another thing [^752]: Another thing [^753]: Another thing [^754]: Another thing [^755]: Another thing [^756]: Another thing [^757]: Another thing [^758]: Another thing [^759]: Another thing [^760]: Another thing [^761]: Another thing [^762]: Another thing [^763]: Another thing [^764]: Another thing [^765]: Another thing [^766]: Another thing [^767]: Another thing [^768]: Another thing [^769]: Another thing [^770]: Another thing [^771]: Another thing [^772]: Another thing [^773]: Another thing [^774]: Another thing [^775]: Another thing [^776]: Another thing [^777]: Another thing [^778]: Another thing [^779]: Another thing [^780]: Another thing [^781]: Another thing [^782]: Another thing [^783]: Another thing [^784]: Another thing [^785]: Another thing [^786]: Another thing [^787]: Another thing [^788]: Another thing [^789]: Another thing [^790]: Another thing [^791]: Another thing [^792]: Another thing [^793]: Another thing [^794]: Another thing [^795]: Another thing [^796]: Another thing [^797]: Another thing [^798]: Another thing [^799]: Another thing [^800]: Another thing [^801]: Another thing [^802]: Another thing [^803]: Another thing [^804]: Another thing [^805]: Another thing [^806]: Another thing [^807]: Another thing [^808]: Another thing [^809]: Another thing [^810]: Another thing [^811]: Another thing [^812]: Another thing [^813]: Another thing [^814]: Another thing [^815]: Another thing [^816]: Another thing [^817]: Another thing [^818]: Another thing [^819]: Another thing [^820]: Another thing [^821]: Another thing [^822]: Another thing [^823]: Another thing [^824]: Another thing [^825]: Another thing [^826]: Another thing [^827]: Another thing [^828]: Another thing [^829]: Another thing [^830]: Another thing [^831]: Another thing [^832]: Another thing [^833]: Another thing [^834]: Another thing [^835]: Another thing [^836]: Another thing [^837]: Another thing [^838]: Another thing [^839]: Another thing [^840]: Another thing [^841]: Another thing [^842]: Another thing [^843]: Another thing [^844]: Another thing [^845]: Another thing [^846]: Another thing [^847]: Another thing [^848]: Another thing [^849]: Another thing [^850]: Another thing [^851]: Another thing [^852]: Another thing [^853]: Another thing [^854]: Another thing [^855]: Another thing [^856]: Another thing [^857]: Another thing [^858]: Another thing [^859]: Another thing [^860]: Another thing [^861]: Another thing [^862]: Another thing [^863]: Another thing [^864]: Another thing [^865]: Another thing [^866]: Another thing [^867]: Another thing [^868]: Another thing [^869]: Another thing [^870]: Another thing [^871]: Another thing [^872]: Another thing [^873]: Another thing [^874]: Another thing [^875]: Another thing [^876]: Another thing [^877]: Another thing [^878]: Another thing [^879]: Another thing [^880]: Another thing [^881]: Another thing [^882]: Another thing [^883]: Another thing [^884]: Another thing [^885]: Another thing [^886]: Another thing [^887]: Another thing [^888]: Another thing [^889]: Another thing [^890]: Another thing [^891]: Another thing [^892]: Another thing [^893]: Another thing [^894]: Another thing [^895]: Another thing [^896]: Another thing [^897]: Another thing [^898]: Another thing [^899]: Another thing [^900]: Another thing [^901]: Another thing [^902]: Another thing [^903]: Another thing [^904]: Another thing [^905]: Another thing [^906]: Another thing [^907]: Another thing [^908]: Another thing [^909]: Another thing [^910]: Another thing [^911]: Another thing [^912]: Another thing [^913]: Another thing [^914]: Another thing [^915]: Another thing [^916]: Another thing [^917]: Another thing [^918]: Another thing [^919]: Another thing [^920]: Another thing [^921]: Another thing [^922]: Another thing [^923]: Another thing [^924]: Another thing [^925]: Another thing [^926]: Another thing [^927]: Another thing [^928]: Another thing [^929]: Another thing [^930]: Another thing [^931]: Another thing [^932]: Another thing [^933]: Another thing [^934]: Another thing [^935]: Another thing [^936]: Another thing [^937]: Another thing [^938]: Another thing [^939]: Another thing [^940]: Another thing [^941]: Another thing [^942]: Another thing [^943]: Another thing [^944]: Another thing [^945]: Another thing [^946]: Another thing [^947]: Another thing [^948]: Another thing [^949]: Another thing [^950]: Another thing [^951]: Another thing [^952]: Another thing [^953]: Another thing [^954]: Another thing [^955]: Another thing [^956]: Another thing [^957]: Another thing [^958]: Another thing [^959]: Another thing [^960]: Another thing [^961]: Another thing [^962]: Another thing [^963]: Another thing [^964]: Another thing [^965]: Another thing [^966]: Another thing [^967]: Another thing [^968]: Another thing [^969]: Another thing [^970]: Another thing [^971]: Another thing [^972]: Another thing [^973]: Another thing [^974]: Another thing [^975]: Another thing [^976]: Another thing [^977]: Another thing [^978]: Another thing [^979]: Another thing [^980]: Another thing [^981]: Another thing [^982]: Another thing [^983]: Another thing [^984]: Another thing [^985]: Another thing [^986]: Another thing [^987]: Another thing [^988]: Another thing [^989]: Another thing [^990]: Another thing [^991]: Another thing [^992]: Another thing [^993]: Another thing [^994]: Another thing [^995]: Another thing [^996]: Another thing [^997]: Another thing [^998]: Another thing [^999]: Another thing [^1000]: Another thing [^1001]: Another thing [^1002]: Another thing [^1003]: Another thing [^1004]: Another thing [^1005]: Another thing [^1006]: Another thing [^1007]: Another thing [^1008]: Another thing [^1009]: Another thing [^1010]: Another thing [^1011]: Another thing [^1012]: Another thing [^1013]: Another thing [^1014]: Another thing [^1015]: Another thing [^1016]: Another thing [^1017]: Another thing [^1018]: Another thing [^1019]: Another thing [^1020]: Another thing [^1021]: Another thing [^1022]: Another thing [^1023]: Another thing [^1024]: Another thing [^1025]: Another thing [^1026]: Another thing [^1027]: Another thing [^1028]: Another thing [^1029]: Another thing [^1030]: Another thing [^1031]: Another thing [^1032]: Another thing [^1033]: Another thing [^1034]: Another thing [^1035]: Another thing [^1036]: Another thing [^1037]: Another thing [^1038]: Another thing [^1039]: Another thing [^1040]: Another thing [^1041]: Another thing [^1042]: Another thing [^1043]: Another thing [^1044]: Another thing [^1045]: Another thing [^1046]: Another thing [^1047]: Another thing [^1048]: Another thing [^1049]: Another thing [^1050]: Another thing [^1051]: Another thing [^1052]: Another thing [^1053]: Another thing [^1054]: Another thing [^1055]: Another thing [^1056]: Another thing [^1057]: Another thing [^1058]: Another thing [^1059]: Another thing [^1060]: Another thing [^1061]: Another thing [^1062]: Another thing [^1063]: Another thing [^1064]: Another thing [^1065]: Another thing [^1066]: Another thing [^1067]: Another thing [^1068]: Another thing [^1069]: Another thing [^1070]: Another thing [^1071]: Another thing [^1072]: Another thing [^1073]: Another thing [^1074]: Another thing [^1075]: Another thing [^1076]: Another thing [^1077]: Another thing [^1078]: Another thing [^1079]: Another thing [^1080]: Another thing [^1081]: Another thing [^1082]: Another thing [^1083]: Another thing [^1084]: Another thing [^1085]: Another thing [^1086]: Another thing [^1087]: Another thing [^1088]: Another thing [^1089]: Another thing [^1090]: Another thing [^1091]: Another thing [^1092]: Another thing [^1093]: Another thing [^1094]: Another thing [^1095]: Another thing [^1096]: Another thing [^1097]: Another thing [^1098]: Another thing [^1099]: Another thing [^1100]: Another thing [^1101]: Another thing [^1102]: Another thing [^1103]: Another thing [^1104]: Another thing [^1105]: Another thing [^1106]: Another thing [^1107]: Another thing [^1108]: Another thing [^1109]: Another thing [^1110]: Another thing [^1111]: Another thing [^1112]: Another thing [^1113]: Another thing [^1114]: Another thing [^1115]: Another thing [^1116]: Another thing [^1117]: Another thing [^1118]: Another thing [^1119]: Another thing [^1120]: Another thing [^1121]: Another thing [^1122]: Another thing [^1123]: Another thing [^1124]: Another thing [^1125]: Another thing [^1126]: Another thing [^1127]: Another thing [^1128]: Another thing [^1129]: Another thing [^1130]: Another thing [^1131]: Another thing [^1132]: Another thing [^1133]: Another thing [^1134]: Another thing [^1135]: Another thing [^1136]: Another thing [^1137]: Another thing [^1138]: Another thing [^1139]: Another thing [^1140]: Another thing [^1141]: Another thing [^1142]: Another thing [^1143]: Another thing [^1144]: Another thing [^1145]: Another thing [^1146]: Another thing [^1147]: Another thing [^1148]: Another thing [^1149]: Another thing [^1150]: Another thing [^1151]: Another thing [^1152]: Another thing [^1153]: Another thing [^1154]: Another thing [^1155]: Another thing [^1156]: Another thing [^1157]: Another thing [^1158]: Another thing [^1159]: Another thing [^1160]: Another thing [^1161]: Another thing [^1162]: Another thing [^1163]: Another thing [^1164]: Another thing [^1165]: Another thing [^1166]: Another thing [^1167]: Another thing [^1168]: Another thing [^1169]: Another thing [^1170]: Another thing [^1171]: Another thing [^1172]: Another thing [^1173]: Another thing [^1174]: Another thing [^1175]: Another thing [^1176]: Another thing [^1177]: Another thing [^1178]: Another thing [^1179]: Another thing [^1180]: Another thing [^1181]: Another thing [^1182]: Another thing [^1183]: Another thing [^1184]: Another thing [^1185]: Another thing [^1186]: Another thing [^1187]: Another thing [^1188]: Another thing [^1189]: Another thing [^1190]: Another thing [^1191]: Another thing [^1192]: Another thing [^1193]: Another thing [^1194]: Another thing [^1195]: Another thing [^1196]: Another thing [^1197]: Another thing [^1198]: Another thing [^1199]: Another thing Markdown-2.6.9/tests/extensions/extra/footnote_placeholder.html0000644000076500000240000000050213064117426025502 0ustar waylanstaff00000000000000

    1. A Footnote. 

    Some text with a footnote1.

    Markdown-2.6.9/tests/extensions/extra/footnote_placeholder.txt0000644000076500000240000000011313064117426025353 0ustar waylanstaff00000000000000///Footnotes Go Here/// Some text with a footnote[^1]. [^1]: A Footnote. Markdown-2.6.9/tests/extensions/extra/footnote_placeholder_depth.html0000644000076500000240000000057013064117426026673 0ustar waylanstaff00000000000000

    1. A Footnote. 

    Some text with a footnote1.

    Markdown-2.6.9/tests/extensions/extra/footnote_placeholder_depth.txt0000644000076500000240000000012313064117426026540 0ustar waylanstaff00000000000000>> ///Footnotes Go Here/// >> >> Some text with a footnote[^1]. [^1]: A Footnote. Markdown-2.6.9/tests/extensions/extra/loose_def_list.html0000644000076500000240000000055313064117426024303 0ustar waylanstaff00000000000000

    some text

    term 1

    def 1-1

    def 2-2

    term 2
    term 3

    def 2-1 line 2 of def 2-1

    def 2-2

    par 2 of def2-2

    more text

    term 4
    not loose
    term 5

    loose

    term 6
    also not loose
    Markdown-2.6.9/tests/extensions/extra/loose_def_list.txt0000644000076500000240000000032113064117426024147 0ustar waylanstaff00000000000000some text term 1 : def 1-1 : def 2-2 term 2 term 3 : def 2-1 line 2 of def 2-1 : def 2-2 par 2 of def2-2 more text term 4 : not loose term 5 : loose term 6 : also not loose Markdown-2.6.9/tests/extensions/extra/markdown-syntax.html0000644000076500000240000007554613064117426024475 0ustar waylanstaff00000000000000

    Markdown: Syntax

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

    Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

    To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    For example, to add an HTML table to a Markdown article:

    This is a regular paragraph.
    
    <table>
        <tr>
            <td>Foo</td>
        </tr>
    </table>
    
    This is another regular paragraph.
    

    Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

    Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.

    Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

    Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

    http://images.google.com/images?num=30&q=larry+bird
    

    you need to encode the URL as:

    http://images.google.com/images?num=30&amp;q=larry+bird
    

    in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

    Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

    So, if you want to include a copyright symbol in your article, you can write:

    &copy;
    

    and Markdown will leave it alone. But if you write:

    AT&T
    

    Markdown will translate it to:

    AT&amp;T
    

    Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

    4 < 5
    

    Markdown will translate it to:

    4 &lt; 5
    

    However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)


    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    Markdown supports two styles of headers, Setext and atx.

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    =============
    
    This is an H2
    -------------
    

    Any number of underlining ='s or -'s will work.

    Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:

    # This is an H1
    
    ## This is an H2
    
    ###### This is an H6
    

    Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :

    # This is an H1 #
    
    ## This is an H2 ##
    
    ### This is an H3 ######
    

    Blockquotes

    Markdown uses email-style > characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    > 
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    > id sem consectetuer libero luctus adipiscing.
    

    Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    id sem consectetuer libero luctus adipiscing.
    

    Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

    > This is the first level of quoting.
    >
    > > This is nested blockquote.
    >
    > Back to the first level.
    

    Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

    > ## This is a header.
    > 
    > 1.   This is the first list item.
    > 2.   This is the second list item.
    > 
    > Here's some example code:
    > 
    >     return shell_exec("echo $input | $markdown_script");
    

    Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists.

    Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:

    *   Red
    *   Green
    *   Blue
    

    is equivalent to:

    +   Red
    +   Green
    +   Blue
    

    and:

    -   Red
    -   Green
    -   Blue
    

    Ordered lists use numbers followed by periods:

    1.  Bird
    2.  McHale
    3.  Parish
    

    It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
    

    If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
    

    or even:

    3. Bird
    1. McHale
    8. Parish
    

    you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to.

    If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

    List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

    To make lists look nice, you can wrap items with hanging indents:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
        Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
        viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
        Suspendisse id sem consectetuer libero luctus adipiscing.
    

    But if you want to be lazy, you don't have to:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
    

    If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output. For example, this input:

    *   Bird
    *   Magic
    

    will turn into:

    <ul>
    <li>Bird</li>
    <li>Magic</li>
    </ul>
    

    But this:

    *   Bird
    
    *   Magic
    

    will turn into:

    <ul>
    <li><p>Bird</p></li>
    <li><p>Magic</p></li>
    </ul>
    

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:

    1.  This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus adipiscing.
    

    It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:

    *   This is a list item with two paragraphs.
    
        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.
    
    *   Another item in the same list.
    

    To put a blockquote within a list item, the blockquote's > delimiters need to be indented:

    *   A list item with a blockquote:
    
        > This is a blockquote
        > inside a list item.
    

    To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:

    *   A list item with a code block:
    
            <code goes here>
    

    It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:

    1986. What a great season.
    

    In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:

    1986\. What a great season.
    

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>
    

    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:

    Here is an example of AppleScript:
    
        tell application "Foo"
            beep
        end tell
    

    will turn into:

    <p>Here is an example of AppleScript:</p>
    
    <pre><code>tell application "Foo"
        beep
    end tell
    </code></pre>
    

    A code block continues until it reaches a line that is not indented (or the end of the article).

    Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

        <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
    

    will turn into:

    <pre><code>&lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
    </code></pre>
    

    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

    * * *
    
    ***
    
    *****
    
    - - -
    
    ---------------------------------------
    
    _ _ _
    

    Span Elements

    Markdown supports two style of links: inline and reference.

    In both styles, the link text is delimited by [square brackets].

    To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

    This is [an example](http://example.com/ "Title") inline link.
    
    [This link](http://example.net/) has no title attribute.
    

    Will produce:

    <p>This is <a href="http://example.com/" title="Title">
    an example</a> inline link.</p>
    
    <p><a href="http://example.net/">This link</a> has no
    title attribute.</p>
    

    If you're referring to a local resource on the same server, you can use relative paths:

    See my [About](/about/) page for details.
    

    Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

    This is [an example][id] reference-style link.
    

    You can optionally use a space to separate the sets of brackets:

    This is [an example] [id] reference-style link.
    

    Then, anywhere in the document, you define your link label like this, on a line by itself:

    [id]: http://example.com/  "Optional Title Here"
    

    That is:

    • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
    • followed by a colon;
    • followed by one or more spaces (or tabs);
    • followed by the URL for the link;
    • optionally followed by a title attribute for the link, enclosed in double or single quotes.

    The link URL may, optionally, be surrounded by angle brackets:

    [id]: <http://example.com/>  "Optional Title Here"
    

    You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"
    

    Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

    Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

    [link text][a]
    [link text][A]
    

    are equivalent.

    The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

    [Google][]
    

    And then define the link:

    [Google]: http://google.com/
    

    Because link names may contain spaces, this shortcut even works for multiple words in the link text:

    Visit [Daring Fireball][] for more information.
    

    And then define the link:

    [Daring Fireball]: http://daringfireball.net/
    

    Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

    Here's an example of reference links in action:

    I get 10 times more traffic from [Google] [1] than from
    [Yahoo] [2] or [MSN] [3].
    
      [1]: http://google.com/        "Google"
      [2]: http://search.yahoo.com/  "Yahoo Search"
      [3]: http://search.msn.com/    "MSN Search"
    

    Using the implicit link name shortcut, you could instead write:

    I get 10 times more traffic from [Google][] than from
    [Yahoo][] or [MSN][].
    
      [google]: http://google.com/        "Google"
      [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
      [msn]:    http://search.msn.com/    "MSN Search"
    

    Both of the above examples will produce the following HTML output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from
    <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
    or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
    

    For comparison, here is the same paragraph written using Markdown's inline link style:

    I get 10 times more traffic from [Google](http://google.com/ "Google")
    than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
    [MSN](http://search.msn.com/ "MSN Search").
    

    The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

    With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

    *single asterisks*
    
    _single underscores_
    
    **double asterisks**
    
    __double underscores__
    

    will produce:

    <em>single asterisks</em>
    
    <em>single underscores</em>
    
    <strong>double asterisks</strong>
    
    <strong>double underscores</strong>
    

    You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

    Emphasis can be used in the middle of a word:

    un*fucking*believable
    

    But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

    To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

    \*this text is surrounded by literal asterisks\*
    

    Code

    To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    

    will produce:

    <p>Use the <code>printf()</code> function.</p>
    

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal backtick (`) here.``
    

    which will produce this:

    <p><code>There is a literal backtick (`) here.</code></p>
    

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    
    A backtick-delimited string in a code span: `` `foo` ``
    

    will produce:

    <p>A single backtick in a code span: <code>`</code></p>
    
    <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
    

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

    Please don't use any `<blink>` tags.
    

    into:

    <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
    

    You can write this:

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
    

    to produce:

    <p><code>&amp;#8212;</code> is the decimal-encoded
    equivalent of <code>&amp;mdash;</code>.</p>
    

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

    Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
    

    That is:

    • An exclamation mark: !;
    • followed by a set of square brackets, containing the alt attribute text for the image;
    • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    

    Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

    [id]: url/to/image  "Optional title attribute"
    

    As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

    <http://example.com/>
    

    Markdown will turn this into:

    <a href="http://example.com/">http://example.com/</a>
    

    Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

    <address@example.com>
    

    into something like this:

    <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
    &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
    &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
    &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
    

    which will render in a browser as a clickable link to "address@example.com".

    (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can backslashes before the asterisks, like this:

    \*literal asterisks\*
    

    Markdown provides backslash escapes for the following characters:

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark
    
    Markdown-2.6.9/tests/extensions/extra/markdown-syntax.txt0000644000076500000240000006544713064117426024347 0ustar waylanstaff00000000000000Markdown: Syntax ================ * [Overview](#overview) * [Philosophy](#philosophy) * [Inline HTML](#html) * [Automatic Escaping for Special Characters](#autoescape) * [Block Elements](#block) * [Paragraphs and Line Breaks](#p) * [Headers](#header) * [Blockquotes](#blockquote) * [Lists](#list) * [Code Blocks](#precode) * [Horizontal Rules](#hr) * [Span Elements](#span) * [Links](#link) * [Emphasis](#em) * [Code](#code) * [Images](#img) * [Miscellaneous](#misc) * [Backslash Escapes](#backslash) * [Automatic Links](#autolink) **Note:** This document is itself written using Markdown; you can [see the source for it by adding '.text' to the URL][src]. [src]: /projects/markdown/syntax.text * * *

    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4], [Grutatext] [5], and [EtText] [6] -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email. [1]: http://docutils.sourceforge.net/mirror/setext.html [2]: http://www.aaronsw.com/2002/atx/ [3]: http://textism.com/tools/textile/ [4]: http://docutils.sourceforge.net/rst.html [5]: http://www.triptico.com/software/grutatxt.html [6]: http://ettext.taint.org/doc/ To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like \*emphasis\*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for *writing* for the web. Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is *not* to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a *publishing* format; Markdown is a *writing* format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text. For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags. The only restrictions are that block-level HTML elements -- e.g. `
    `, ``, `
    `, `

    `, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) `

    ` tags around HTML block-level tags. For example, to add an HTML table to a Markdown article: This is a regular paragraph.

    Foo
    This is another regular paragraph. Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an HTML block. Span-level HTML tags -- e.g. ``, ``, or `` -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML `` or `` tags instead of Markdown's link or image syntax, go right ahead. Unlike block-level HTML tags, Markdown syntax *is* processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: `<` and `&`. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. `<`, and `&`. Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write '`AT&T`'. You even need to escape ampersands within URLs. Thus, if you want to link to: http://images.google.com/images?num=30&q=larry+bird you need to encode the URL as: http://images.google.com/images?num=30&q=larry+bird in your anchor tag `href` attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites. Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into `&`. So, if you want to include a copyright symbol in your article, you can write: © and Markdown will leave it alone. But if you write: AT&T Markdown will translate it to: AT&T Similarly, because Markdown supports [inline HTML](#html), if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write: 4 < 5 Markdown will translate it to: 4 < 5 However, inside Markdown code spans and blocks, angle brackets and ampersands are *always* encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single `<` and `&` in your example code needs to be escaped.) * * *

    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a `
    ` tag. When you *do* want to insert a `
    ` break tag using Markdown, you end a line with two or more spaces, then type return. Yes, this takes a tad more effort to create a `
    `, but a simplistic "every line break is a `
    `" rule wouldn't work for Markdown. Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l] work best -- and look better -- when you format them with hard breaks. [bq]: #blockquote [l]: #list Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example: This is an H1 ============= This is an H2 ------------- Any number of underlining `=`'s or `-`'s will work. Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example: # This is an H1 ## This is an H2 ###### This is an H6 Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) : # This is an H1 # ## This is an H2 ## ### This is an H3 ######

    Blockquotes

    Markdown uses email-style `>` characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a `>` before every line: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse > id sem consectetuer libero luctus adipiscing. Markdown allows you to be lazy and only put the `>` before the first line of a hard-wrapped paragraph: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of `>`: > This is the first level of quoting. > > > This is nested blockquote. > > Back to the first level. Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: > ## This is a header. > > 1. This is the first list item. > 2. This is the second list item. > > Here's some example code: > > return shell_exec("echo $input | $markdown_script"); Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists. Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers: * Red * Green * Blue is equivalent to: + Red + Green + Blue and: - Red - Green - Blue Ordered lists use numbers followed by periods: 1. Bird 2. McHale 3. Parish It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
    1. Bird
    2. McHale
    3. Parish
    If you instead wrote the list in Markdown like this: 1. Bird 1. McHale 1. Parish or even: 3. Bird 1. McHale 8. Parish you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. To make lists look nice, you can wrap items with hanging indents: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. But if you want to be lazy, you don't have to: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. If list items are separated by blank lines, Markdown will wrap the items in `

    ` tags in the HTML output. For example, this input: * Bird * Magic will turn into:

    • Bird
    • Magic
    But this: * Bird * Magic will turn into:
    • Bird

    • Magic

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab: 1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 2. Suspendisse id sem consectetuer libero luctus adipiscing. It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy: * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. To put a blockquote within a list item, the blockquote's `>` delimiters need to be indented: * A list item with a blockquote: > This is a blockquote > inside a list item. To put a code block within a list item, the code block needs to be indented *twice* -- 8 spaces or two tabs: * A list item with a code block: It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this: 1986. What a great season. In other words, a *number-period-space* sequence at the beginning of a line. To avoid this, you can backslash-escape the period: 1986\. What a great season.

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both `
    ` and `` tags.
    
    To produce a code block in Markdown, simply indent every line of the
    block by at least 4 spaces or 1 tab. For example, given this input:
    
        This is a normal paragraph:
    
            This is a code block.
    
    Markdown will generate:
    
        

    This is a normal paragraph:

    This is a code block.
        
    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this: Here is an example of AppleScript: tell application "Foo" beep end tell will turn into:

    Here is an example of AppleScript:

    tell application "Foo"
            beep
        end tell
        
    A code block continues until it reaches a line that is not indented (or the end of the article). Within a code block, ampersands (`&`) and angle brackets (`<` and `>`) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this: will turn into:
    <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
        
    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (`
    `) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule: * * * *** ***** - - - --------------------------------------- _ _ _ * * *

    Span Elements

    Markdown supports two style of links: *inline* and *reference*. In both styles, the link text is delimited by [square brackets]. To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an *optional* title for the link, surrounded in quotes. For example: This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute. Will produce:

    This is an example inline link.

    This link has no title attribute.

    If you're referring to a local resource on the same server, you can use relative paths: See my [About](/about/) page for details. Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link: This is [an example][id] reference-style link. You can optionally use a space to separate the sets of brackets: This is [an example] [id] reference-style link. Then, anywhere in the document, you define your link label like this, on a line by itself: [id]: http://example.com/ "Optional Title Here" That is: * Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces); * followed by a colon; * followed by one or more spaces (or tabs); * followed by the URL for the link; * optionally followed by a title attribute for the link, enclosed in double or single quotes. The link URL may, optionally, be surrounded by angle brackets: [id]: "Optional Title Here" You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs: [id]: http://example.com/longish/path/to/resource/here "Optional Title Here" Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output. Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links: [link text][a] [link text][A] are equivalent. The *implicit link name* shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write: [Google][] And then define the link: [Google]: http://google.com/ Because link names may contain spaces, this shortcut even works for multiple words in the link text: Visit [Daring Fireball][] for more information. And then define the link: [Daring Fireball]: http://daringfireball.net/ Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes. Here's an example of reference links in action: I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search" Using the implicit link name shortcut, you could instead write: I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][]. [google]: http://google.com/ "Google" [yahoo]: http://search.yahoo.com/ "Yahoo Search" [msn]: http://search.msn.com/ "MSN Search" Both of the above examples will produce the following HTML output:

    I get 10 times more traffic from Google than from Yahoo or MSN.

    For comparison, here is the same paragraph written using Markdown's inline link style: I get 10 times more traffic from [Google](http://google.com/ "Google") than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or [MSN](http://search.msn.com/ "MSN Search"). The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text. With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (`*`) and underscores (`_`) as indicators of emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` tag. E.g., this input: *single asterisks* _single underscores_ **double asterisks** __double underscores__ will produce: single asterisks single underscores double asterisks double underscores You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span. Emphasis can be used in the middle of a word: un*fucking*believable But if you surround an `*` or `_` with spaces, it'll be treated as a literal asterisk or underscore. To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it: \*this text is surrounded by literal asterisks\*

    Code

    To indicate a span of code, wrap it with backtick quotes (`` ` ``). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example: Use the `printf()` function. will produce:

    Use the printf() function.

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: ``There is a literal backtick (`) here.`` which will produce this:

    There is a literal backtick (`) here.

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span: A single backtick in a code span: `` ` `` A backtick-delimited string in a code span: `` `foo` `` will produce:

    A single backtick in a code span: `

    A backtick-delimited string in a code span: `foo`

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this: Please don't use any `` tags. into:

    Please don't use any <blink> tags.

    You can write this: `—` is the decimal-encoded equivalent of `—`. to produce:

    &#8212; is the decimal-encoded equivalent of &mdash;.

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format. Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: *inline* and *reference*. Inline image syntax looks like this: ![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title") That is: * An exclamation mark: `!`; * followed by a set of square brackets, containing the `alt` attribute text for the image; * followed by a set of parentheses, containing the URL or path to the image, and an optional `title` attribute enclosed in double or single quotes. Reference-style image syntax looks like this: ![Alt text][id] Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references: [id]: url/to/image "Optional title attribute" As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML `` tags. * * *

    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: Markdown will turn this into: http://example.com/ Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this: into something like this: address@exa mple.com which will render in a browser as a clickable link to "address@example.com". (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML `` tag), you can backslashes before the asterisks, like this: \*literal asterisks\* Markdown provides backslash escapes for the following characters: \ backslash ` backtick * asterisk _ underscore {} curly braces [] square brackets () parentheses # hash mark + plus sign - minus sign (hyphen) . dot ! exclamation mark Markdown-2.6.9/tests/extensions/extra/named_markers.html0000644000076500000240000000226013064117426024116 0ustar waylanstaff00000000000000

    This is the body with footnotes1 that have named2 markers and oddly3 numbered4 markers.


    1. Footnote marked foo

    2. This one is marked bar

    3. A numbered footnote. 

    4. The last one. 

    Markdown-2.6.9/tests/extensions/extra/named_markers.txt0000644000076500000240000000034713064117426023775 0ustar waylanstaff00000000000000This is the body with footnotes[^foo] that have named[^bar] markers and oddly[^56] numbered[^99] markers. [^foo]: Footnote marked ``foo``. [^bar]: This one is marked *bar*. [^56]: A __numbered__ footnote. [^99]: The last one. Markdown-2.6.9/tests/extensions/extra/raw-html.html0000644000076500000240000000243713064117426023047 0ustar waylanstaff00000000000000

    foo

    bar

    blah

    The text of the Example element.

    This text gets wrapped in p tags.

    The tail of the DefaultBlockMode subelement.

    This text is not wrapped in additional p tags.

    The tail of the DefaultSpanMode subelement.

    This div block is not wrapped in paragraph tags. Note: Subelements are not required to have tail text.

    This p block is foolishly wrapped in further paragraph tags.

    The tail of the BlockModeOverride subelement.

    Raw html blocks may also be nested.

    This text is after the markdown in html.

    1 2

    Markdown is active here.

    Raw html blocks may also be nested.

    Markdown is still active here.

    Markdown is active again here.

    foo bar

    bar

    Markdown-2.6.9/tests/extensions/extra/raw-html.txt0000644000076500000240000000230713064117426022716 0ustar waylanstaff00000000000000
    _foo_
    _bar_
    _blah_
    The text of the `Example` element.
    This text gets wrapped in `p` tags.
    The tail of the `DefaultBlockMode` subelement.

    This text *is not* wrapped in additional `p` tags.

    The tail of the `DefaultSpanMode` subelement.
    This `div` block is not wrapped in paragraph tags. Note: Subelements are not required to have tail text.

    This `p` block *is* foolishly wrapped in further paragraph tags.

    The tail of the `BlockModeOverride` subelement.
    Raw html blocks may also be nested.
    This text is after the markdown in html.
    1 2
    Markdown is *active* here.
    Raw html blocks may also be nested.
    Markdown is *still* active here.
    Markdown is *active again* here.
    foo bar bar
    Markdown-2.6.9/tests/extensions/extra/simple_def-lists.html0000644000076500000240000000111413064117426024546 0ustar waylanstaff00000000000000

    Some text

    term1
    Def1
    term2-1
    term2-2
    Def2-1
    Def2-2

    more text

    term 3

    def 3 line 2 of def 3

    paragraph 2 of def 3.

    def 3-2

    # A code block in a def
    

    a blockquote

    • a list item

    • blockquote in list

    and more text.

    term 4
    def4 line 2 of def 4

    final text.

    Markdown-2.6.9/tests/extensions/extra/simple_def-lists.txt0000644000076500000240000000050213064117426024421 0ustar waylanstaff00000000000000Some text term1 : Def1 term2-1 term2-2 : Def2-1 : Def2-2 more text term *3* : def 3 line __2__ of def 3 paragraph 2 of def 3. : def 3-2 # A code block in a def > a blockquote * a list item * > blockquote in list and more text. term 4 : def4 line 2 of def 4 final text. Markdown-2.6.9/tests/extensions/extra/tables.html0000644000076500000240000001373113064117426022565 0ustar waylanstaff00000000000000

    Table Tests

    First Header Second Header
    Content Cell Content Cell
    Content Cell Content Cell
    First Header Second Header
    Content Cell Content Cell
    Content Cell Content Cell
    Item Value
    Computer $1600
    Phone $12
    Pipe $1
    Function name Description
    help() Display the help window.
    destroy() Destroy your computer!
    foo bar baz
    Q
    W W
    foo bar baz
    Q
    W W

    Three spaces in front of a table:

    First Header Second Header
    Content Cell Content Cell
    Content Cell Content Cell
    First Header Second Header
    Content Cell Content Cell
    Content Cell Content Cell

    Four spaces is a code block:

    First Header | Second Header
    ------------ | -------------
    Content Cell | Content Cell
    Content Cell | Content Cell
    
    First Header Second Header

    More inline code block tests

    Column 1 Column 2 Column 3
    word 1 word 2 word 3
    word 1 word 2 word 3
    word 1 `word 2 word 3
    word 1 `word 2 word 3
    word 1 word |2 word 3
    words some | code more words
    words some | code more words
    words some | code more words
    words some ` | ` code more words
    words some ` | ` code more words
    words some ` | ` code more words

    A test for issue #440:

    foo bar
    foo (bar) and baz.

    Lists are not tables

    • this | should | not
    • be | a | table

    Add tests for issue #449

    Odd backticks Even backticks
    [!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~] [!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^`_`{|}~]
    Escapes More Escapes
    `\ \

    Only the first backtick can be escaped

    Escaped Bacticks
    `\ ``

    Test escaped pipes

    Column 1 Column 2
    | | Pipes are okay in code and escaped. |
    Column 1 Column 2
    row1 row1 |
    row2 row2

    Test header escapes

    `\ | \ |
    row1 row1
    row2 row2

    Escaped pipes in format row should not be a table

    | Column1 | Column2 | | ------- || ------- | | row1 | row1 | | row2 | row2 |

    Test escaped code in Table

    Should not be code Should be code
    `Not code` \code
    \`Not code\` \\code

    Single column tables

    Is a Table
    Is a Table
    Is a Table
    Is a Table
    row
    Is a Table
    row
    Is a Table
    row

    | Is not a Table

    | row

    Is not a Table |

    row |

    | Is not a Table | -------------- row

    Is not a Table | -------------- | row

    Markdown-2.6.9/tests/extensions/extra/tables.txt0000644000076500000240000000623013064117426022434 0ustar waylanstaff00000000000000Table Tests ----------- First Header | Second Header ------------- | ------------- Content Cell | Content Cell Content Cell | Content Cell | First Header | Second Header | | ------------- | ------------- | | Content Cell | Content Cell | | Content Cell | Content Cell | | Item | Value | | :-------- | -----:| | Computer | $1600 | | Phone | $12 | | Pipe | $1 | | Function name | Description | | ------------- | ------------------------------ | | `help()` | Display the help window. | | `destroy()` | **Destroy your computer!** | |foo|bar|baz| |:--|:-:|--:| | | Q | | |W | | W| foo|bar|baz ---|---|--- | Q | W | | W Three spaces in front of a table: First Header | Second Header ------------ | ------------- Content Cell | Content Cell Content Cell | Content Cell | First Header | Second Header | | ------------ | ------------- | | Content Cell | Content Cell | | Content Cell | Content Cell | Four spaces is a code block: First Header | Second Header ------------ | ------------- Content Cell | Content Cell Content Cell | Content Cell | First Header | Second Header | | ------------ | ------------- | More inline code block tests Column 1 | Column 2 | Column 3 ---------|----------|--------- word 1 | word 2 | word 3 word 1 | `word 2` | word 3 word 1 | \`word 2 | word 3 word 1 | `word 2 | word 3 word 1 | `word |2` | word 3 words |`` some | code `` | more words words |``` some | code ``` | more words words |```` some | code ```` | more words words |`` some ` | ` code `` | more words words |``` some ` | ` code ``` | more words words |```` some ` | ` code ```` | more words A test for issue #440: foo | bar --- | --- foo | (`bar`) and `baz`. Lists are not tables - this | should | not - be | a | table Add tests for issue #449 Odd backticks | Even backticks ------------ | ------------- ``[!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~]`` | ``[!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^`_`{|}~]`` Escapes | More Escapes ------- | ------ `` `\`` | `\` Only the first backtick can be escaped Escaped | Bacticks ------- | ------ \`` \` | \`\` Test escaped pipes Column 1 | Column 2 -------- | -------- `|` \| | Pipes are okay in code and escaped. \| | Column 1 | Column 2 | | -------- | -------- | | row1 | row1 \| | row2 | row2 | Test header escapes | `` `\`` \| | `\` \| | ---------- | ---- | | row1 | row1 | | row2 | row2 | Escaped pipes in format row should not be a table | Column1 | Column2 | | ------- \|| ------- | | row1 | row1 | | row2 | row2 | Test escaped code in Table Should not be code | Should be code ------------------ | -------------- \`Not code\` | \\`code` \\\`Not code\\\` | \\\\`code` Single column tables | Is a Table | | ---------- | | Is a Table | ---------- Is a Table | ---------- | | Is a Table | | ---------- | | row | | Is a Table | ---------- | row Is a Table | ---------- | row | | Is not a Table -------------- | row Is not a Table | -------------- row | | Is not a Table | -------------- row Is not a Table | -------------- | row Markdown-2.6.9/tests/extensions/extra/tables_and_attr_list.html0000644000076500000240000000044013064117426025465 0ustar waylanstaff00000000000000
    First Header Second Header
    Content Cell Content Cell
    Content Cell Content Cell
    Markdown-2.6.9/tests/extensions/extra/tables_and_attr_list.txt0000644000076500000240000000050213064117426025337 0ustar waylanstaff00000000000000First Header | Second Header ------------------------------------------------------ | ------------- Content Cell{: class="foo bar" title="Some title!" } | Content Cell Content Cell | Content Cell{: class="foo bar" title="Some title!" } Markdown-2.6.9/tests/extensions/extra/test.cfg0000644000076500000240000000132713064117426022063 0ustar waylanstaff00000000000000DEFAULT: extensions: - markdown.extensions.extra loose_def_list: extensions: - markdown.extensions.def_list simple_def-lists: extensions: - markdown.extensions.def_list abbr: extensions: - markdown.extensions.abbr footnotes: extensions: - markdown.extensions.footnotes tables: extensions: - markdown.extensions.tables tables_and_attr_list: extensions: - markdown.extensions.tables - markdown.extensions.attr_list extra_config: extensions: - markdown.extensions.extra extension_configs: markdown.extensions.extra: markdown.extensions.footnotes: PLACE_MARKER: ~~~placemarker~~~ Markdown-2.6.9/tests/extensions/fenced_code.html0000644000076500000240000000156613064117426022411 0ustar waylanstaff00000000000000

    index 0000000..6e956a9

    --- /dev/null
    +++ b/test/data/stripped_text/mike-30-lili
    @@ -0,0 +1,27 @@
    +Summary:
    + drift_mod.py |    1 +
    + 1 files changed, 1 insertions(+), 0 deletions(-)
    +
    +commit da4bfb04debdd994683740878d09988b2641513d
    +Author: Mike Dirolf <mike@dirolf.com>
    +Date:   Tue Jan 17 13:42:28 2012 -0500
    +
    +```
    +minor: just wanted to push something.
    +```
    +
    +diff --git a/drift_mod.py b/drift_mod.py
    +index 34dfba6..8a88a69 100644
    +
    +```
    +--- a/drift_mod.py
    ++++ b/drift_mod.py
    +@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
    +                                        '|\+ .*'
    +                                        '|- .*'
    +                                        ')$')
    ++
    + def wrap_context_diffs(message_text):
    +     return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
    +                       CONTEXT_DIFF_LINE_PATTERN,
    +```
    
    Markdown-2.6.9/tests/extensions/fenced_code.txt0000644000076500000240000000153213064117426022255 0ustar waylanstaff00000000000000index 0000000..6e956a9 ``` --- /dev/null +++ b/test/data/stripped_text/mike-30-lili @@ -0,0 +1,27 @@ +Summary: + drift_mod.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit da4bfb04debdd994683740878d09988b2641513d +Author: Mike Dirolf +Date: Tue Jan 17 13:42:28 2012 -0500 + +``` +minor: just wanted to push something. +``` + +diff --git a/drift_mod.py b/drift_mod.py +index 34dfba6..8a88a69 100644 + +``` +--- a/drift_mod.py ++++ b/drift_mod.py +@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^(' + '|\+ .*' + '|- .*' + ')$') ++ + def wrap_context_diffs(message_text): + return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN, + CONTEXT_DIFF_LINE_PATTERN, +``` ``` Markdown-2.6.9/tests/extensions/github_flavored.html0000644000076500000240000000226213064117426023331 0ustar waylanstaff00000000000000

    index 0000000..6e956a9

    --- /dev/null
    +++ b/test/data/stripped_text/mike-30-lili
    @@ -0,0 +1,27 @@
    +Summary:
    + drift_mod.py |    1 +
    + 1 files changed, 1 insertions(+), 0 deletions(-)
    +
    +commit da4bfb04debdd994683740878d09988b2641513d
    +Author: Mike Dirolf <mike@dirolf.com>
    +Date:   Tue Jan 17 13:42:28 2012 -0500
    +
    +```
    +minor: just wanted to push something.
    +```
    +
    +diff --git a/drift_mod.py b/drift_mod.py
    +index 34dfba6..8a88a69 100644
    +
    +```
    +--- a/drift_mod.py
    ++++ b/drift_mod.py
    +@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^('
    +                                        '|\+ .*'
    +                                        '|- .*'
    +                                        ')$')
    ++
    + def wrap_context_diffs(message_text):
    +     return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN,
    +                       CONTEXT_DIFF_LINE_PATTERN,
    +```
    

    Test support for foo+bar lexer names.

    <title>{% block title %}{% endblock %}</title>
    <ul>
    {% for user in users %}
      <li><a href="{{ user.url }}">{{ user.username }}</a></li>
    {% endfor %}
    </ul>
    
    Markdown-2.6.9/tests/extensions/github_flavored.txt0000644000076500000240000000206313064117426023203 0ustar waylanstaff00000000000000index 0000000..6e956a9 ```diff --- /dev/null +++ b/test/data/stripped_text/mike-30-lili @@ -0,0 +1,27 @@ +Summary: + drift_mod.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +commit da4bfb04debdd994683740878d09988b2641513d +Author: Mike Dirolf +Date: Tue Jan 17 13:42:28 2012 -0500 + +``` +minor: just wanted to push something. +``` + +diff --git a/drift_mod.py b/drift_mod.py +index 34dfba6..8a88a69 100644 + +``` +--- a/drift_mod.py ++++ b/drift_mod.py +@@ -281,6 +281,7 @@ CONTEXT_DIFF_LINE_PATTERN = re.compile(r'^(' + '|\+ .*' + '|- .*' + ')$') ++ + def wrap_context_diffs(message_text): + return _wrap_diff(CONTEXT_DIFF_HEADER_PATTERN, + CONTEXT_DIFF_LINE_PATTERN, +``` ``` Test support for foo+bar lexer names. ```html+jinja {% block title %}{% endblock %} ``` Markdown-2.6.9/tests/extensions/nl2br_w_attr_list.html0000644000076500000240000000003113064117426023607 0ustar waylanstaff00000000000000

    Foo

    Markdown-2.6.9/tests/extensions/nl2br_w_attr_list.txt0000644000076500000240000000001413064117426023463 0ustar waylanstaff00000000000000Foo {: #bar}Markdown-2.6.9/tests/extensions/sane_lists.html0000644000076500000240000000040413064117426022325 0ustar waylanstaff00000000000000
    1. Ordered
    2. List
    • Unordered
    • List
    1. Ordered again

    Paragraph * not a list item

    1. More ordered * not a list item
    • Unordered again 1. not a list item
    Markdown-2.6.9/tests/extensions/sane_lists.txt0000644000076500000240000000023713064117426022204 0ustar waylanstaff000000000000001. Ordered 2. List * Unordered * List 1. Ordered again Paragraph * not a list item 1. More ordered * not a list item * Unordered again 1. not a list item Markdown-2.6.9/tests/extensions/smarty.html0000644000076500000240000000243213064117426021503 0ustar waylanstaff00000000000000

    ’.
    1440–80’s
    1440–’80s
    1440—’80s
    1960s
    1960’s
    one two ’60s
    ’60s

    It’s fun. What’s fun?
    “Isn’t this fun”? — she said…
    “‘Quoted’ words in a larger quote.”
    ‘Quoted “words” in a larger quote.’
    “quoted” text and bold “quoted” text
    ‘quoted’ text and bold ‘quoted’ text
    em-dashes (—) and ellipes (…)
    Link” — she said.

    “Ellipsis within quotes…”

    Кавычки-«Ñ‘лочки»
    «hello»
    Anführungszeichen-»Chevrons«


    Escaped -- ndash
    'Escaped' "quotes"
    Escaped ellipsis...

    ‘Escaped "quotes" in real ones’
    '“Real” quotes in escaped ones'

    Skip <<all>> "code" -- --- 'spans' ....

    Also skip "code" 'blocks'
    foo -- bar --- baz ...
    

    A line that ‘wraps’ with emphasis at the beginning of the next line.

    Markdown-2.6.9/tests/extensions/smarty.txt0000644000076500000240000000145413064117426021361 0ustar waylanstaff00000000000000'. 1440--80's 1440--'80s 1440---'80s 1960s 1960's one two '60s '60s It's fun. What's fun? "Isn't this fun"? --- she said... "'Quoted' words in a larger quote." 'Quoted "words" in a larger quote.' "quoted" text and **bold "quoted" text** 'quoted' text and **bold 'quoted' text** em-dashes (---) and ellipes (...) "[Link](http://example.com)" --- she said. "Ellipsis within quotes..." Кавычки-<<ёлочки>> <> Anführungszeichen->>Chevrons<< --- -- --- Escaped \-- ndash \'Escaped\' \"quotes\" Escaped ellipsis\... 'Escaped \"quotes\" in real ones' \'"Real" quotes in escaped ones\' Skip `<> "code" -- --- 'spans' ...`. Also skip "code" 'blocks' foo -- bar --- baz ... A line that 'wraps' with *emphasis* at the beginning of the next line. Markdown-2.6.9/tests/extensions/test.cfg0000644000076500000240000000267613064117426020750 0ustar waylanstaff00000000000000attr_list: extensions: - markdown.extensions.attr_list - markdown.extensions.def_list - markdown.extensions.smarty codehilite: extensions: - markdown.extensions.codehilite # This passes or not based on version of pygments. skip: True toc: extensions: - markdown.extensions.toc toc_invalid: extensions: - markdown.extensions.toc toc_out_of_order: extensions: - markdown.extensions.toc toc_nested: extensions: - markdown.extensions.toc extension_configs: markdown.extensions.toc: permalink: True toc_nested2: extensions: - markdown.extensions.toc extension_configs: markdown.extensions.toc: permalink: "[link]" toc_nested_list: extensions: - markdown.extensions.toc wikilinks: extensions: - markdown.extensions.wikilinks fenced_code: extensions: - markdown.extensions.fenced_code github_flavored: extensions: - markdown.extensions.fenced_code sane_lists: extensions: - markdown.extensions.sane_lists nl2br_w_attr_list: extensions: - markdown.extensions.nl2br - markdown.extensions.attr_list admonition: extensions: - markdown.extensions.admonition smarty: extensions: - markdown.extensions.smarty extension_configs: markdown.extensions.smarty: smart_angled_quotes: TrueMarkdown-2.6.9/tests/extensions/toc.html0000644000076500000240000007471113064117426020762 0ustar waylanstaff00000000000000

    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

    Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

    To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    For example, to add an HTML table to a Markdown article:

    This is a regular paragraph.
    
    <table>
        <tr>
            <td>Foo</td>
        </tr>
    </table>
    
    This is another regular paragraph.
    

    Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

    Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.

    Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

    Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

    http://images.google.com/images?num=30&q=larry+bird
    

    you need to encode the URL as:

    http://images.google.com/images?num=30&amp;q=larry+bird
    

    in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

    Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

    So, if you want to include a copyright symbol in your article, you can write:

    &copy;
    

    and Markdown will leave it alone. But if you write:

    AT&T
    

    Markdown will translate it to:

    AT&amp;T
    

    Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

    4 < 5
    

    Markdown will translate it to:

    4 &lt; 5
    

    However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)


    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    Headers

    Markdown supports two styles of headers, Setext and atx.

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    =============
    
    This is an H2
    -------------
    

    Any number of underlining ='s or -'s will work.

    Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:

    # This is an H1
    
    ## This is an H2
    
    ###### This is an H6
    

    Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :

    # This is an H1 #
    
    ## This is an H2 ##
    
    ### This is an H3 ######
    

    Blockquotes

    Markdown uses email-style > characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    > 
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    > id sem consectetuer libero luctus adipiscing.
    

    Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    id sem consectetuer libero luctus adipiscing.
    

    Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

    > This is the first level of quoting.
    >
    > > This is nested blockquote.
    >
    > Back to the first level.
    

    Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

    > ## This is a header.
    > 
    > 1.   This is the first list item.
    > 2.   This is the second list item.
    > 
    > Here's some example code:
    > 
    >     return shell_exec("echo $input | $markdown_script");
    

    Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists.

    Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:

    *   Red
    *   Green
    *   Blue
    

    is equivalent to:

    +   Red
    +   Green
    +   Blue
    

    and:

    -   Red
    -   Green
    -   Blue
    

    Ordered lists use numbers followed by periods:

    1.  Bird
    2.  McHale
    3.  Parish
    

    It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
    

    If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
    

    or even:

    3. Bird
    1. McHale
    8. Parish
    

    you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to.

    If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

    List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

    To make lists look nice, you can wrap items with hanging indents:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
        Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
        viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
        Suspendisse id sem consectetuer libero luctus adipiscing.
    

    But if you want to be lazy, you don't have to:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
    

    If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output. For example, this input:

    *   Bird
    *   Magic
    

    will turn into:

    <ul>
    <li>Bird</li>
    <li>Magic</li>
    </ul>
    

    But this:

    *   Bird
    
    *   Magic
    

    will turn into:

    <ul>
    <li><p>Bird</p></li>
    <li><p>Magic</p></li>
    </ul>
    

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:

    1.  This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus adipiscing.
    

    It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:

    *   This is a list item with two paragraphs.
    
        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.
    
    *   Another item in the same list.
    

    To put a blockquote within a list item, the blockquote's > delimiters need to be indented:

    *   A list item with a blockquote:
    
        > This is a blockquote
        > inside a list item.
    

    To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:

    *   A list item with a code block:
    
            <code goes here>
    

    It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:

    1986. What a great season.
    

    In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:

    1986\. What a great season.
    

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>
    

    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:

    Here is an example of AppleScript:
    
        tell application "Foo"
            beep
        end tell
    

    will turn into:

    <p>Here is an example of AppleScript:</p>
    
    <pre><code>tell application "Foo"
        beep
    end tell
    </code></pre>
    

    A code block continues until it reaches a line that is not indented (or the end of the article).

    Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

        <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
    

    will turn into:

    <pre><code>&lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
    </code></pre>
    

    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

    * * *
    
    ***
    
    *****
    
    - - -
    
    ---------------------------------------
    
    _ _ _
    

    Span Elements

    Markdown supports two style of links: inline and reference.

    In both styles, the link text is delimited by [square brackets].

    To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

    This is [an example](http://example.com/ "Title") inline link.
    
    [This link](http://example.net/) has no title attribute.
    

    Will produce:

    <p>This is <a href="http://example.com/" title="Title">
    an example</a> inline link.</p>
    
    <p><a href="http://example.net/">This link</a> has no
    title attribute.</p>
    

    If you're referring to a local resource on the same server, you can use relative paths:

    See my [About](/about/) page for details.
    

    Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

    This is [an example][id] reference-style link.
    

    You can optionally use a space to separate the sets of brackets:

    This is [an example] [id] reference-style link.
    

    Then, anywhere in the document, you define your link label like this, on a line by itself:

    [id]: http://example.com/  "Optional Title Here"
    

    That is:

    • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
    • followed by a colon;
    • followed by one or more spaces (or tabs);
    • followed by the URL for the link;
    • optionally followed by a title attribute for the link, enclosed in double or single quotes.

    The link URL may, optionally, be surrounded by angle brackets:

    [id]: <http://example.com/>  "Optional Title Here"
    

    You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"
    

    Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

    Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

    [link text][a]
    [link text][A]
    

    are equivalent.

    The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

    [Google][]
    

    And then define the link:

    [Google]: http://google.com/
    

    Because link names may contain spaces, this shortcut even works for multiple words in the link text:

    Visit [Daring Fireball][] for more information.
    

    And then define the link:

    [Daring Fireball]: http://daringfireball.net/
    

    Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

    Here's an example of reference links in action:

    I get 10 times more traffic from [Google] [1] than from
    [Yahoo] [2] or [MSN] [3].
    
      [1]: http://google.com/        "Google"
      [2]: http://search.yahoo.com/  "Yahoo Search"
      [3]: http://search.msn.com/    "MSN Search"
    

    Using the implicit link name shortcut, you could instead write:

    I get 10 times more traffic from [Google][] than from
    [Yahoo][] or [MSN][].
    
      [google]: http://google.com/        "Google"
      [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
      [msn]:    http://search.msn.com/    "MSN Search"
    

    Both of the above examples will produce the following HTML output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from
    <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
    or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
    

    For comparison, here is the same paragraph written using Markdown's inline link style:

    I get 10 times more traffic from [Google](http://google.com/ "Google")
    than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
    [MSN](http://search.msn.com/ "MSN Search").
    

    The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

    With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

    *single asterisks*
    
    _single underscores_
    
    **double asterisks**
    
    __double underscores__
    

    will produce:

    <em>single asterisks</em>
    
    <em>single underscores</em>
    
    <strong>double asterisks</strong>
    
    <strong>double underscores</strong>
    

    You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

    Emphasis can be used in the middle of a word:

    un*fucking*believable
    

    But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

    To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

    \*this text is surrounded by literal asterisks\*
    

    Code

    To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    

    will produce:

    <p>Use the <code>printf()</code> function.</p>
    

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal backtick (`) here.``
    

    which will produce this:

    <p><code>There is a literal backtick (`) here.</code></p>
    

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    
    A backtick-delimited string in a code span: `` `foo` ``
    

    will produce:

    <p>A single backtick in a code span: <code>`</code></p>
    
    <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
    

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

    Please don't use any `<blink>` tags.
    

    into:

    <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
    

    You can write this:

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
    

    to produce:

    <p><code>&amp;#8212;</code> is the decimal-encoded
    equivalent of <code>&amp;mdash;</code>.</p>
    

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

    Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
    

    That is:

    • An exclamation mark: !;
    • followed by a set of square brackets, containing the alt attribute text for the image;
    • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    

    Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

    [id]: url/to/image  "Optional title attribute"
    

    As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

    <http://example.com/>
    

    Markdown will turn this into:

    <a href="http://example.com/">http://example.com/</a>
    

    Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

    <address@example.com>
    

    into something like this:

    <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
    &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
    &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
    &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
    

    which will render in a browser as a clickable link to "address@example.com".

    (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can backslashes before the asterisks, like this:

    \*literal asterisks\*
    

    Markdown provides backslash escapes for the following characters:

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark
    
    Markdown-2.6.9/tests/extensions/toc.txt0000644000076500000240000006233313064117426020632 0ustar waylanstaff00000000000000 [TOC] # Overview ## Philosophy Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4], [Grutatext] [5], and [EtText] [6] -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email. [1]: http://docutils.sourceforge.net/mirror/setext.html [2]: http://www.aaronsw.com/2002/atx/ [3]: http://textism.com/tools/textile/ [4]: http://docutils.sourceforge.net/rst.html [5]: http://www.triptico.com/software/grutatxt.html [6]: http://ettext.taint.org/doc/ To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like \*emphasis\*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email. ## Inline HTML Markdown's syntax is intended for one purpose: to be used as a format for *writing* for the web. Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is *not* to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a *publishing* format; Markdown is a *writing* format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text. For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags. The only restrictions are that block-level HTML elements -- e.g. `
    `, ``, `
    `, `

    `, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) `

    ` tags around HTML block-level tags. For example, to add an HTML table to a Markdown article: This is a regular paragraph.

    Foo
    This is another regular paragraph. Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an HTML block. Span-level HTML tags -- e.g. ``, ``, or `` -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML `` or `` tags instead of Markdown's link or image syntax, go right ahead. Unlike block-level HTML tags, Markdown syntax *is* processed within span-level tags. ## Automatic Escaping for Special Characters In HTML, there are two characters that demand special treatment: `<` and `&`. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. `<`, and `&`. Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write '`AT&T`'. You even need to escape ampersands within URLs. Thus, if you want to link to: http://images.google.com/images?num=30&q=larry+bird you need to encode the URL as: http://images.google.com/images?num=30&q=larry+bird in your anchor tag `href` attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites. Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into `&`. So, if you want to include a copyright symbol in your article, you can write: © and Markdown will leave it alone. But if you write: AT&T Markdown will translate it to: AT&T Similarly, because Markdown supports [inline HTML](#html), if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write: 4 < 5 Markdown will translate it to: 4 < 5 However, inside Markdown code spans and blocks, angle brackets and ampersands are *always* encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single `<` and `&` in your example code needs to be escaped.) * * * # Block Elements ## Paragraphs and Line Breaks A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs. The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a `
    ` tag. When you *do* want to insert a `
    ` break tag using Markdown, you end a line with two or more spaces, then type return. Yes, this takes a tad more effort to create a `
    `, but a simplistic "every line break is a `
    `" rule wouldn't work for Markdown. Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l] work best -- and look better -- when you format them with hard breaks. [bq]: #blockquote [l]: #list ## Headers Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example: This is an H1 ============= This is an H2 ------------- Any number of underlining `=`'s or `-`'s will work. Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example: # This is an H1 ## This is an H2 ###### This is an H6 Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) : # This is an H1 # ## This is an H2 ## ### This is an H3 ###### ## Blockquotes Markdown uses email-style `>` characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a `>` before every line: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse > id sem consectetuer libero luctus adipiscing. Markdown allows you to be lazy and only put the `>` before the first line of a hard-wrapped paragraph: > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of `>`: > This is the first level of quoting. > > > This is nested blockquote. > > Back to the first level. Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: > ## This is a header. > > 1. This is the first list item. > 2. This is the second list item. > > Here's some example code: > > return shell_exec("echo $input | $markdown_script"); Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu. ## Lists Markdown supports ordered (numbered) and unordered (bulleted) lists. Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers: * Red * Green * Blue is equivalent to: + Red + Green + Blue and: - Red - Green - Blue Ordered lists use numbers followed by periods: 1. Bird 2. McHale 3. Parish It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
    1. Bird
    2. McHale
    3. Parish
    If you instead wrote the list in Markdown like this: 1. Bird 1. McHale 1. Parish or even: 3. Bird 1. McHale 8. Parish you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. To make lists look nice, you can wrap items with hanging indents: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. But if you want to be lazy, you don't have to: * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing. If list items are separated by blank lines, Markdown will wrap the items in `

    ` tags in the HTML output. For example, this input: * Bird * Magic will turn into:

    • Bird
    • Magic
    But this: * Bird * Magic will turn into:
    • Bird

    • Magic

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab: 1. This is a list item with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 2. Suspendisse id sem consectetuer libero luctus adipiscing. It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy: * This is a list item with two paragraphs. This is the second paragraph in the list item. You're only required to indent the first line. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. * Another item in the same list. To put a blockquote within a list item, the blockquote's `>` delimiters need to be indented: * A list item with a blockquote: > This is a blockquote > inside a list item. To put a code block within a list item, the code block needs to be indented *twice* -- 8 spaces or two tabs: * A list item with a code block: It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this: 1986. What a great season. In other words, a *number-period-space* sequence at the beginning of a line. To avoid this, you can backslash-escape the period: 1986\. What a great season. ## Code Blocks Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both `
    ` and `` tags.
    
    To produce a code block in Markdown, simply indent every line of the
    block by at least 4 spaces or 1 tab. For example, given this input:
    
        This is a normal paragraph:
    
            This is a code block.
    
    Markdown will generate:
    
        

    This is a normal paragraph:

    This is a code block.
        
    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this: Here is an example of AppleScript: tell application "Foo" beep end tell will turn into:

    Here is an example of AppleScript:

    tell application "Foo"
            beep
        end tell
        
    A code block continues until it reaches a line that is not indented (or the end of the article). Within a code block, ampersands (`&`) and angle brackets (`<` and `>`) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this: will turn into:
    <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
        
    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax. ## Horizontal Rules You can produce a horizontal rule tag (`
    `) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule: * * * *** ***** - - - --------------------------------------- _ _ _ * * * # Span Elements ## Links Markdown supports two style of links: *inline* and *reference*. In both styles, the link text is delimited by [square brackets]. To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an *optional* title for the link, surrounded in quotes. For example: This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute. Will produce:

    This is an example inline link.

    This link has no title attribute.

    If you're referring to a local resource on the same server, you can use relative paths: See my [About](/about/) page for details. Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link: This is [an example][id] reference-style link. You can optionally use a space to separate the sets of brackets: This is [an example] [id] reference-style link. Then, anywhere in the document, you define your link label like this, on a line by itself: [id]: http://example.com/ "Optional Title Here" That is: * Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces); * followed by a colon; * followed by one or more spaces (or tabs); * followed by the URL for the link; * optionally followed by a title attribute for the link, enclosed in double or single quotes. The link URL may, optionally, be surrounded by angle brackets: [id]: "Optional Title Here" You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs: [id]: http://example.com/longish/path/to/resource/here "Optional Title Here" Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output. Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links: [link text][a] [link text][A] are equivalent. The *implicit link name* shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write: [Google][] And then define the link: [Google]: http://google.com/ Because link names may contain spaces, this shortcut even works for multiple words in the link text: Visit [Daring Fireball][] for more information. And then define the link: [Daring Fireball]: http://daringfireball.net/ Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes. Here's an example of reference links in action: I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search" Using the implicit link name shortcut, you could instead write: I get 10 times more traffic from [Google][] than from [Yahoo][] or [MSN][]. [google]: http://google.com/ "Google" [yahoo]: http://search.yahoo.com/ "Yahoo Search" [msn]: http://search.msn.com/ "MSN Search" Both of the above examples will produce the following HTML output:

    I get 10 times more traffic from Google than from Yahoo or MSN.

    For comparison, here is the same paragraph written using Markdown's inline link style: I get 10 times more traffic from [Google](http://google.com/ "Google") than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or [MSN](http://search.msn.com/ "MSN Search"). The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text. With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose. ## Emphasis Markdown treats asterisks (`*`) and underscores (`_`) as indicators of emphasis. Text wrapped with one `*` or `_` will be wrapped with an HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML `` tag. E.g., this input: *single asterisks* _single underscores_ **double asterisks** __double underscores__ will produce: single asterisks single underscores double asterisks double underscores You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span. Emphasis can be used in the middle of a word: un*fucking*believable But if you surround an `*` or `_` with spaces, it'll be treated as a literal asterisk or underscore. To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it: \*this text is surrounded by literal asterisks\* ## Code To indicate a span of code, wrap it with backtick quotes (`` ` ``). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example: Use the `printf()` function. will produce:

    Use the printf() function.

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: ``There is a literal backtick (`) here.`` which will produce this:

    There is a literal backtick (`) here.

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span: A single backtick in a code span: `` ` `` A backtick-delimited string in a code span: `` `foo` `` will produce:

    A single backtick in a code span: `

    A backtick-delimited string in a code span: `foo`

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this: Please don't use any `` tags. into:

    Please don't use any <blink> tags.

    You can write this: `—` is the decimal-encoded equivalent of `—`. to produce:

    &#8212; is the decimal-encoded equivalent of &mdash;.

    ## Images Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format. Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: *inline* and *reference*. Inline image syntax looks like this: ![Alt text](/path/to/img.jpg) ![Alt text](/path/to/img.jpg "Optional title") That is: * An exclamation mark: `!`; * followed by a set of square brackets, containing the `alt` attribute text for the image; * followed by a set of parentheses, containing the URL or path to the image, and an optional `title` attribute enclosed in double or single quotes. Reference-style image syntax looks like this: ![Alt text][id] Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references: [id]: url/to/image "Optional title attribute" As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML `` tags. * * * # Miscellaneous ## Automatic Links Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: Markdown will turn this into: http://example.com/ Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this: into something like this: address@exa mple.com which will render in a browser as a clickable link to "address@example.com". (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.) ## Backslash Escapes Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML `` tag), you can backslashes before the asterisks, like this: \*literal asterisks\* Markdown provides backslash escapes for the following characters: \ backslash ` backtick * asterisk _ underscore {} curly braces [] square brackets () parentheses # hash mark + plus sign - minus sign (hyphen) . dot ! exclamation mark Markdown-2.6.9/tests/extensions/toc_invalid.html0000644000076500000240000000050213064117426022453 0ustar waylanstaff00000000000000

    [TOC]

    Header 1

    The TOC marker cannot be inside a header. This test makes sure markdown doesn't crash when it encounters this errant syntax. The unexpected output should clue the author in that s/he needs to add a blank line between the TOC and the <hr>.

    Markdown-2.6.9/tests/extensions/toc_invalid.txt0000644000076500000240000000041413064117426022330 0ustar waylanstaff00000000000000[TOC] ----- # Header 1 The TOC marker cannot be inside a header. This test makes sure markdown doesn't crash when it encounters this errant syntax. The unexpected output should clue the author in that s/he needs to add a blank line between the TOC and the `
    `. Markdown-2.6.9/tests/extensions/toc_nested.html0000644000076500000240000000121213064117426022306 0ustar waylanstaff00000000000000

    Header A

    Header 1

    Header i

    Header B

    Markdown-2.6.9/tests/extensions/toc_nested.txt0000644000076500000240000000007313064117426022165 0ustar waylanstaff00000000000000# Header A ## Header 1 ### Header i # Header *B* [TOC] Markdown-2.6.9/tests/extensions/toc_nested2.html0000644000076500000240000000136613064117426022402 0ustar waylanstaff00000000000000

    Start with header other than one.[link]

    Header 3[link]

    Header 4[link]

    Header 3[link]

    Markdown-2.6.9/tests/extensions/toc_nested2.txt0000644000076500000240000000013113064117426022242 0ustar waylanstaff00000000000000[TOC] ### Start with header other than one. ### Header 3 #### Header 4 ### Header 3 Markdown-2.6.9/tests/extensions/toc_nested_list.html0000644000076500000240000000120613064117426023344 0ustar waylanstaff00000000000000

    Title

    Section 1

    1. List Item 1

      Subsection 1

      Explanation 1

    2. List Item 2

      Subsection 2

      Explanation 2

    Section 2

    Section 3

    Markdown-2.6.9/tests/extensions/toc_nested_list.txt0000644000076500000240000000025013064117426023215 0ustar waylanstaff00000000000000# Title [TOC] ## Section 1 1. List Item 1 ### Subsection 1 Explanation 1 2. List Item 2 ### Subsection 2 Explanation 2 ## Section 2 ## Section 3Markdown-2.6.9/tests/extensions/toc_out_of_order.html0000644000076500000240000000026713064117426023523 0ustar waylanstaff00000000000000

    Header 2

    Header 1

    Markdown-2.6.9/tests/extensions/toc_out_of_order.txt0000644000076500000240000000003713064117426023371 0ustar waylanstaff00000000000000[TOC] ## Header 2 # Header 1 Markdown-2.6.9/tests/extensions/wikilinks.html0000644000076500000240000000156113064117426022172 0ustar waylanstaff00000000000000

    Some text with a WikiLink.

    A link with white space and_underscores and a empty one.

    Another with double spaces and double__underscores and one that has emphasis inside and one with_multiple_underscores and one that is emphasised.

    And a RealLink.

    http://example.com/And_A_AutoLink

    And a MarkdownLink for completeness.

    Markdown-2.6.9/tests/extensions/wikilinks.txt0000644000076500000240000000067413064117426022051 0ustar waylanstaff00000000000000Some text with a [[WikiLink]]. A link with [[ white space and_underscores ]] and a empty [[ ]] one. Another with [[double spaces]] and [[double__underscores]] and one that [[has _emphasis_ inside]] and one [[with_multiple_underscores]] and one that is _[[emphasised]]_. And a RealLink. And a [MarkdownLink](/MarkdownLink/ "A MarkdownLink") for completeness. Markdown-2.6.9/tests/misc/0000755000076500000240000000000013145427671016037 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/misc/adjacent-headers.html0000644000076500000240000000010013064117426022070 0ustar waylanstaff00000000000000

    this is a huge header

    this is a smaller header

    Markdown-2.6.9/tests/misc/adjacent-headers.txt0000644000076500000240000000007113064117426021752 0ustar waylanstaff00000000000000# this is a huge header # ## this is a smaller header ## Markdown-2.6.9/tests/misc/amp-in-url.html0000644000076500000240000000010113064117426020670 0ustar waylanstaff00000000000000

    link

    Markdown-2.6.9/tests/misc/amp-in-url.txt0000644000076500000240000000005413064117426020552 0ustar waylanstaff00000000000000[link](http://www.freewisdom.org/this&that) Markdown-2.6.9/tests/misc/ampersand.html0000644000076500000240000000003413064117426020666 0ustar waylanstaff00000000000000

    &

    AT&T

    Markdown-2.6.9/tests/misc/ampersand.txt0000644000076500000240000000001213064117426020535 0ustar waylanstaff00000000000000& AT&T Markdown-2.6.9/tests/misc/arabic.html0000644000076500000240000000422513064117426020143 0ustar waylanstaff00000000000000

    بايثون

    بايثون لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (OOP) وقابلة للتطوير Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­Ø© المصدر. صÙÙ†ÙØª بالأساس كلغة ØªÙØ³ÙŠØ±ÙŠØ© ØŒ بايثون مصممة أصلاً للأداء بعض المهام الخاصة أو المحدودة. إلا أنه يمكن استخدامها بايثون لإنجاز المشاريع الضخمه كأي لغة برمجية أخرى، غالباً ما ÙŠÙنصح المبتدئين ÙÙŠ ميدان البرمجة بتعلم هذه اللغة لأنها من بين أسهل اللغات البرمجية تعلماً.

    نشأت بايثون ÙÙŠ مركز CWI (مركز العلوم والحاسب الآلي) بأمستردام على يد جويدو ÙØ§Ù† Ø±ÙØ²ÙˆÙ…. تم تطويرها بلغة C. أطلق ÙØ§Ù† Ø±ÙØ²ÙˆÙ… اسم "بايثون" على لغته تعبيرًا عن إعجابه بÙÙØ±Ù‚ÙŽØ© مسرحية هزلية شهيرة من بريطانيا، كانت تطلق على Ù†ÙØ³Ù‡Ø§ اسم مونتي بايثون Monty Python.

    تتميز بايثون بمجتمعها النشط ØŒ كما أن لها الكثير من المكتبات البرمجية ذات الأغراض الخاصة والتي برمجها أشخاص من مجتمع هذه اللغة ØŒ مثلاً مكتبة PyGame التي ØªÙˆÙØ± مجموعه من الوظائ٠من اجل برمجة الالعاب. ويمكن لبايثون التعامل مع العديد من أنواع قواعد البيانات مثل MySQL وغيره.

    أمثلة

    مثال Hello World!

    print "Hello World!"
    

    مثال لاستخراج المضروب Factorial :

    num = 1
    x = raw_input('Insert the number please ')
    x = int(x)
    
    if x > 69:
     print 'Math Error !'
    else:
     while x > 1:
      num *= x
      x = x-1
    
     print num
    

    وصلات خارجية

    بذرة حاس

    Markdown-2.6.9/tests/misc/arabic.txt0000644000076500000240000000406713064117426020022 0ustar waylanstaff00000000000000 بايثون ===== **بايثون** لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (OOP) وقابلة للتطوير Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­Ø© المصدر. صÙÙ†ÙØª بالأساس كلغة ØªÙØ³ÙŠØ±ÙŠØ© ØŒ بايثون مصممة أصلاً للأداء بعض المهام الخاصة أو المحدودة. إلا أنه يمكن استخدامها بايثون لإنجاز المشاريع الضخمه كأي لغة برمجية أخرى، غالباً ما ÙŠÙنصح المبتدئين ÙÙŠ ميدان البرمجة بتعلم هذه اللغة لأنها من بين أسهل اللغات البرمجية تعلماً. نشأت بايثون ÙÙŠ مركز CWI (مركز العلوم والحاسب الآلي) بأمستردام على يد جويدو ÙØ§Ù† Ø±ÙØ²ÙˆÙ…. تم تطويرها بلغة C. أطلق ÙØ§Ù† Ø±ÙØ²ÙˆÙ… اسم "بايثون" على لغته تعبيرًا عن إعجابه بÙÙØ±Ù‚ÙŽØ© مسرحية هزلية شهيرة من بريطانيا، كانت تطلق على Ù†ÙØ³Ù‡Ø§ اسم مونتي بايثون Monty Python. تتميز بايثون بمجتمعها النشط ØŒ كما أن لها الكثير من المكتبات البرمجية ذات الأغراض الخاصة والتي برمجها أشخاص من مجتمع هذه اللغة ØŒ مثلاً مكتبة PyGame التي ØªÙˆÙØ± مجموعه من الوظائ٠من اجل برمجة الالعاب. ويمكن لبايثون التعامل مع العديد من أنواع قواعد البيانات مثل MySQL وغيره. ##أمثلة مثال Hello World! print "Hello World!" مثال لاستخراج المضروب Factorial : num = 1 x = raw_input('Insert the number please ') x = int(x) if x > 69: print 'Math Error !' else: while x > 1: num *= x x = x-1 print num ##وصلات خارجية * [الموقع الرسمي للغة بايثون](http://www.python.org) بذرة حاس Markdown-2.6.9/tests/misc/attributes-image-ref.html0000644000076500000240000000010013064117426022726 0ustar waylanstaff00000000000000

    img

    Markdown-2.6.9/tests/misc/attributes-image-ref.txt0000644000076500000240000000007113064117426022610 0ustar waylanstaff00000000000000![img{@id=foo}][img] [img]: http://example.com/i.jpg Markdown-2.6.9/tests/misc/attributes2.html0000644000076500000240000000023713064117426021171 0ustar waylanstaff00000000000000

    Or in the middle of the text

    Markdown-2.6.9/tests/misc/attributes2.txt0000644000076500000240000000017713064117426021047 0ustar waylanstaff00000000000000{@id=TABLE.OF.CONTENTS} * {@id=TABLEOFCONTENTS} Or in the middle of the text {@id=TABLEOFCONTENTS} {@id=tableofcontents} Markdown-2.6.9/tests/misc/autolinks_with_asterisks.html0000644000076500000240000000012613064117426024052 0ustar waylanstaff00000000000000

    http://some.site/weird*url*thing

    Markdown-2.6.9/tests/misc/autolinks_with_asterisks.txt0000644000076500000240000000004413064117426023724 0ustar waylanstaff00000000000000 Markdown-2.6.9/tests/misc/autolinks_with_asterisks_russian.html0000644000076500000240000000020413064117426025613 0ustar waylanstaff00000000000000

    http://some.site/нечто*очень*Ñтранное

    Markdown-2.6.9/tests/misc/autolinks_with_asterisks_russian.txt0000644000076500000240000000007413064117426025473 0ustar waylanstaff00000000000000 Markdown-2.6.9/tests/misc/backtick-escape.html0000644000076500000240000000022613064117426021730 0ustar waylanstaff00000000000000

    `This should not be in code.` \This should be in code.\\ \`This should not be in code.\` `And finally this should not be in code.`

    Markdown-2.6.9/tests/misc/backtick-escape.txt0000644000076500000240000000021513064117426021601 0ustar waylanstaff00000000000000\`This should not be in code.\` \\`This should be in code.\\` \\\`This should not be in code.\\\` \`And finally this should not be in code.` Markdown-2.6.9/tests/misc/bidi.html0000644000076500000240000001727013064117426017635 0ustar waylanstaff00000000000000

    Python(パイソン)ã¯ã€Guido van Rossum ã«ã‚ˆã£ã¦ä½œã‚‰ã‚ŒãŸã‚ªãƒ¼ãƒ—ンソースã®ã‚ªãƒ–ジェクト指å‘スクリプト言語。Perlã¨ã¨ã‚‚ã«æ¬§ç±³ã§åºƒãæ™®åŠã—ã¦ã„る。イギリスã®ãƒ†ãƒ¬ãƒ“å±€ BBC ãŒè£½ä½œã—ãŸã‚³ãƒ¡ãƒ‡ã‚£ç•ªçµ„『空飛ã¶ãƒ¢ãƒ³ãƒ†ã‚£ãƒ»ãƒ‘イソンã€ã«ã¡ãªã‚“ã§å付ã‘られãŸã€‚ (Pythonã«ã¯ã€çˆ¬è™«é¡žã®ãƒ‹ã‚·ã‚­ãƒ˜ãƒ“ã®æ„味ãŒã‚りã€Python言語ã®ãƒžã‚¹ã‚³ãƒƒãƒˆã‚„アイコンã¨ã—ã¦ä½¿ã‚れるã“ã¨ãŒã‚る。)

    |||||||||||||||||||||||||||||THIS SHOULD BE LTR|||||||||||||||||||||||||

    |||||||||||||||||||||||||||||THIS SHOULD BE RTL|||||||||||||||||||||||||

    (بايثون لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (THIS SHOULD BE LTR ) وقابلة للتطوير Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­

    پایتون زبان برنامه‌نویسی ØªÙØ³ÛŒØ±ÛŒ Ùˆ سطح بالا ØŒ شی‌گرا Ùˆ یک زبان برنامه‌نویسی ØªÙØ³ÛŒØ±ÛŒ سمت سرور قدرتمند است Ú©Ù‡ توسط گیدو ون روسوم در سال Û±Û¹Û¹Û° ساخته شد. این زبان در ویژگی‌ها شبیه پرل، روبی، اسکیم، اسمال‌تاک Ùˆ تی‌سی‌ال است Ùˆ از مدیریت خودکار Ø­Ø§ÙØ¸Ù‡ Ø§Ø³ØªÙØ§Ø¯Ù‡ می‌کند

    Python,是一ç§é¢å‘对象的ã€ç›´è­¯å¼çš„计算机程åºè®¾è®¡è¯­è¨€ï¼Œä¹Ÿæ˜¯ä¸€ç§åŠŸèƒ½å¼ºå¤§è€Œå®Œå–„çš„é€šç”¨åž‹è¯­è¨€ï¼Œå·²ç»å…·æœ‰å多年的å‘展历å²ï¼Œæˆç†Ÿä¸”稳定。

    Þ„Þ°ÞÞ« ÞˆÞ­ÞÞ°ÞŽÞ¬ Þ‹Þ« މަތީގައި Þ‡Þ¬Þ‡Þ°ÞŠÞ¦Þ€Þ¦ÞƒÞ§ 50 Þ‰Þ©Þ€ÞªÞ‚Þ°Þ‚Þ¦ÞÞ° ތިބެވިދާނެވެ. Þ„Þ®Þ‘Þª Þ‰Þ¦Þ€ÞªÞŽÞ¬ Þ‹ÞªÞÞ¦Þ†Þ© Þ‡Þ¬Þ€Þ§Þ‰Þ¬ Þ„Þ®Þ‘Þª Þ‡Þ¬Þ‡Þ°Þ—Þ¬Þ†Þ¬ÞˆÞ¬.

    உரà¯à®¤à¯ 13ஆம௠நூறà¯à®±à®¾à®£à¯à®Ÿà®¿à®²à¯ உரà¯à®µà®¾à®© ஒர௠இநà¯à®¤à¯‹-à®à®°à¯‹à®ªà¯à®ªà®¿à®¯ மொழியாகà¯à®®à¯. உரà¯à®¤à¯, ஹிநà¯à®¤à®¿à®¯à¯à®Ÿà®©à¯ சேரà¯à®¤à¯à®¤à¯ "ஹிநà¯à®¤à¯à®¸à¯à®¤à®¾à®©à®¿" என அழைகà¯à®•பà¯à®ªà®Ÿà¯à®•ினà¯à®±à®¤à¯. மணà¯à®Ÿà®°à®¿à®©à¯, ஆஙà¯à®•ிலம௠ஆகியவறà¯à®±à¯à®•à¯à®•௠அடà¯à®¤à¯à®¤à®ªà®Ÿà®¿à®¯à®¾à®• மூனà¯à®±à®¾à®µà®¤à¯ கூடிய அளவ௠மகà¯à®•ளால௠பà¯à®°à®¿à®¨à¯à®¤à¯ கொளà¯à®³à®ªà¯à®ªà®Ÿà®•à¯à®•ூடியத௠ஹிநà¯à®¤à¯à®¸à¯à®¤à®¾à®©à®¿à®¯à¯‡à®¯à®¾à®•à¯à®®à¯. தாய௠மொழியாகப௠பேசà¯à®ªà®µà®°à¯à®•ள௠எணà¯à®£à®¿à®•à¯à®•ையின௠அடிபà¯à®ªà®Ÿà¯ˆà®¯à®¿à®²à¯ உரà¯à®¤à¯ உலகின௠20 ஆவத௠பெரிய மொழியாகà¯à®®à¯. 6 கோடி மகà¯à®•ள௠இதனைத௠தாய௠மொழியாகக௠கொணà¯à®Ÿà¯à®³à¯à®³à®¾à®°à¯à®•ளà¯. இரணà¯à®Ÿà®¾à®µà®¤à¯ மொழியாகக௠கொணà¯à®Ÿà¯à®³à¯à®³à®µà®°à¯à®•ள௠உடà¯à®ªà®Ÿ 11 கோடிப௠பேர௠இதனைப௠பேசà¯à®•ிறாரà¯à®•ளà¯. உரà¯à®¤à¯ பாகிஸà¯à®¤à®¾à®©à®¿à®©à¯ அரசகரà¯à®® மொழியாகவà¯à®®à¯, இநà¯à®¤à®¿à®¯à®¾à®µà®¿à®©à¯ அரசகரà¯à®® மொழிகளà¯à®³à¯ ஒனà¯à®±à®¾à®•வà¯à®®à¯ விளஙà¯à®•à¯à®•ிறதà¯.

    اردو Ûندوآریائی زبانوں Ú©ÛŒ Ûندويورپی شاخ Ú©ÛŒ ایک زبان ÛÛ’ جو تيرھويں صدی ميں بر صغير ميں پيدا Ûوئی Ù€ اردو پاکستان Ú©ÛŒ سرکاری زبان ÛÛ’ اور بھارت Ú©ÛŒ سرکاری زبانوں ميں سے ايک ÛÛ’Û” اردو بھارت ميں 5 کروڑ اور پاکستان ميں 1 کروڑ لوگوں Ú©ÛŒ مادری زبان ÛÛ’ مگر اسے بھارت اور پاکستان Ú©Û’ تقریباً 50 کروڑ لوگ بول اور سمجھ سکتے ھیں Û” جن میں سے تقریباً 10.5 کروڑ لوگ اسے Ø¨Ø§Ù‚Ø§Ø¹Ø¯Û Ø¨ÙˆÙ„ØªÛ’ ھیں۔

    بايثون

    بايثون لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (OOP) وقابلة للتطوير Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­Ø© المصدر. صÙÙ†ÙØª بالأساس كلغة ØªÙØ³ÙŠØ±ÙŠØ© ØŒ بايثون مصممة أصلاً للأداء بعض المهام الخاصة أو المحدودة. إلا أنه يمكن استخدامها بايثون لإنجاز المشاريع الضخمه كأي لغة برمجية أخرى، غالباً ما ÙŠÙنصح المبتدئين ÙÙŠ ميدان البرمجة بتعلم هذه اللغة لأنها من بين أسهل اللغات البرمجية تعلماً.

    |||||||||||||||||||||||||||||THIS SHOULD BE RTL|||||||||||||||||||||||||

    (نشأت بايثون ÙÙŠ مركز CWI (مركز العلوم والحاسب الآلي) بأمستردام على يد جويدو ÙØ§Ù† Ø±ÙØ²ÙˆÙ…. تم تطويرها بلغة C. أطلق ÙØ§Ù† Ø±ÙØ²ÙˆÙ… اسم "بايثون" على لغته تعبيرًا عن إعجابه بÙÙØ±Ù‚ÙŽØ© مسرحية هزلية شهيرة من بريطانيا، كانت تطلق على Ù†ÙØ³Ù‡Ø§ اسم مونتي بايثون Monty Python.

    تتميز بايثون بمجتمعها النشط ØŒ كما أن لها الكثير من المكتبات البرمجية ذات الأغراض الخاصة والتي برمجها أشخاص من مجتمع هذه اللغة ØŒ مثلاً مكتبة PyGame التي ØªÙˆÙØ± مجموعه من الوظائ٠من اجل برمجة الالعاب. ويمكن لبايثون التعامل مع العديد من أنواع قواعد البيانات مثل MySQL وغيره.

    أمثلة

    مثال Hello World!

    print "Hello World!"
    

    مثال لاستخراج المضروب Factorial :

    num = 1
    x = raw_input('Insert the number please ')
    x = int(x)
    
    if x > 69:
     print 'Math Error !'
    else:
     while x > 1:
      num *= x
      x = x-1
    
     print num
    

    وصلات خارجية

    بذرة حاس

    Ðедвард «Ðед» Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ (Nedward «Ned» Flanders) — вымышленный перÑонаж мультÑериала «[СимпÑоны][]», озвученный Гарри Ширером. Он и его ÑÐµÐ¼ÑŒÑ Ð¶Ð¸Ð²ÑƒÑ‚ по ÑоÑедÑтву от Ñемьи СимпÑонов. Ðабожный хриÑтианин, Ðед ÑвлÑетÑÑ Ð¾Ð´Ð½Ð¸Ð¼ из Ñтолпов морали Спрингфилда. Ð’ Ñпизоде «Alone Again, Natura-Diddily» он овдовел, его жена Мод погибла в результате неÑчаÑтного ÑлучаÑ.

    Ðед был одним из первых перÑонажей в мультÑериале, который не был членом Ñемьи СимпÑонов. ÐÐ°Ñ‡Ð¸Ð½Ð°Ñ Ñ Ð¿ÐµÑ€Ð²Ñ‹Ñ… Ñерий, он регулÑрно поÑвлÑетÑÑ Ð² «СимпÑонах». СчитаетÑÑ, что Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ð±Ñ‹Ð» назван в чеÑть улицы Northeast Flanders St. в Портленде, Орегон, родном городе ÑÐ¾Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ Ð¼ÑƒÐ»ÑŒÑ‚Ñериала МÑтта Грейнинга]]. ÐадпиÑÑŒ на указателе улицы NE Flanders St. хулиганы чаÑто иÑправлÑли на NED Flanders St.

    Markdown-2.6.9/tests/misc/bidi.txt0000644000076500000240000001665713064117426017520 0ustar waylanstaff00000000000000**Python**(パイソン)ã¯ã€[Guido van Rossum](http://en.wikipedia.org/wiki/Guido_van_Rossum) ã«ã‚ˆã£ã¦ä½œã‚‰ã‚ŒãŸã‚ªãƒ¼ãƒ—ンソースã®ã‚ªãƒ–ジェクト指å‘スクリプト言語。[Perl](http://ja.wikipedia.org/wiki/Perl)ã¨ã¨ã‚‚ã«æ¬§ç±³ã§åºƒãæ™®åŠã—ã¦ã„る。イギリスã®ãƒ†ãƒ¬ãƒ“å±€ BBC ãŒè£½ä½œã—ãŸã‚³ãƒ¡ãƒ‡ã‚£ç•ªçµ„『空飛ã¶ãƒ¢ãƒ³ãƒ†ã‚£ãƒ»ãƒ‘イソンã€ã«ã¡ãªã‚“ã§å付ã‘られãŸã€‚ (Pythonã«ã¯ã€çˆ¬è™«é¡žã®ãƒ‹ã‚·ã‚­ãƒ˜ãƒ“ã®æ„味ãŒã‚りã€Python言語ã®ãƒžã‚¹ã‚³ãƒƒãƒˆã‚„アイコンã¨ã—ã¦ä½¿ã‚れるã“ã¨ãŒã‚る。) |||||||||||||||||||||||||||||THIS SHOULD BE LTR||||||||||||||||||||||||| |||||||||||||||||||||||||||||THIS SHOULD BE RTL||||||||||||||||||||||||| {@dir=rtl} (**بايثون** لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (THIS SHOULD BE LTR ) وقابلة للتطوير {@dir=ltr} Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­ پایتون زبان برنامه‌نویسی ØªÙØ³ÛŒØ±ÛŒ Ùˆ سطح بالا ØŒ شی‌گرا Ùˆ یک زبان برنامه‌نویسی ØªÙØ³ÛŒØ±ÛŒ سمت سرور قدرتمند است Ú©Ù‡ توسط گیدو ون روسوم در سال Û±Û¹Û¹Û° ساخته شد. این زبان در ویژگی‌ها شبیه پرل، روبی، اسکیم، اسمال‌تاک Ùˆ تی‌سی‌ال است Ùˆ از مدیریت خودکار Ø­Ø§ÙØ¸Ù‡ Ø§Ø³ØªÙØ§Ø¯Ù‡ می‌کند Python,是一ç§é¢å‘对象的ã€ç›´è­¯å¼çš„计算机程åºè®¾è®¡è¯­è¨€ï¼Œä¹Ÿæ˜¯ä¸€ç§åŠŸèƒ½å¼ºå¤§è€Œå®Œå–„çš„é€šç”¨åž‹è¯­è¨€ï¼Œå·²ç»å…·æœ‰å多年的å‘展历å²ï¼Œæˆç†Ÿä¸”稳定。 Þ„Þ°ÞÞ« ÞˆÞ­ÞÞ°ÞŽÞ¬ Þ‹Þ« މަތީގައި Þ‡Þ¬Þ‡Þ°ÞŠÞ¦Þ€Þ¦ÞƒÞ§ 50 Þ‰Þ©Þ€ÞªÞ‚Þ°Þ‚Þ¦ÞÞ° ތިބެވިދާނެވެ. Þ„Þ®Þ‘Þª Þ‰Þ¦Þ€ÞªÞŽÞ¬ Þ‹ÞªÞÞ¦Þ†Þ© Þ‡Þ¬Þ€Þ§Þ‰Þ¬ Þ„Þ®Þ‘Þª Þ‡Þ¬Þ‡Þ°Þ—Þ¬Þ†Þ¬ÞˆÞ¬. **உரà¯à®¤à¯** 13ஆம௠நூறà¯à®±à®¾à®£à¯à®Ÿà®¿à®²à¯ உரà¯à®µà®¾à®© ஒர௠இநà¯à®¤à¯‹-à®à®°à¯‹à®ªà¯à®ªà®¿à®¯ மொழியாகà¯à®®à¯. உரà¯à®¤à¯, ஹிநà¯à®¤à®¿à®¯à¯à®Ÿà®©à¯ சேரà¯à®¤à¯à®¤à¯ "ஹிநà¯à®¤à¯à®¸à¯à®¤à®¾à®©à®¿" என அழைகà¯à®•பà¯à®ªà®Ÿà¯à®•ினà¯à®±à®¤à¯. மணà¯à®Ÿà®°à®¿à®©à¯, ஆஙà¯à®•ிலம௠ஆகியவறà¯à®±à¯à®•à¯à®•௠அடà¯à®¤à¯à®¤à®ªà®Ÿà®¿à®¯à®¾à®• மூனà¯à®±à®¾à®µà®¤à¯ கூடிய அளவ௠மகà¯à®•ளால௠பà¯à®°à®¿à®¨à¯à®¤à¯ கொளà¯à®³à®ªà¯à®ªà®Ÿà®•à¯à®•ூடியத௠ஹிநà¯à®¤à¯à®¸à¯à®¤à®¾à®©à®¿à®¯à¯‡à®¯à®¾à®•à¯à®®à¯. தாய௠மொழியாகப௠பேசà¯à®ªà®µà®°à¯à®•ள௠எணà¯à®£à®¿à®•à¯à®•ையின௠அடிபà¯à®ªà®Ÿà¯ˆà®¯à®¿à®²à¯ உரà¯à®¤à¯ உலகின௠20 ஆவத௠பெரிய மொழியாகà¯à®®à¯. 6 கோடி மகà¯à®•ள௠இதனைத௠தாய௠மொழியாகக௠கொணà¯à®Ÿà¯à®³à¯à®³à®¾à®°à¯à®•ளà¯. இரணà¯à®Ÿà®¾à®µà®¤à¯ மொழியாகக௠கொணà¯à®Ÿà¯à®³à¯à®³à®µà®°à¯à®•ள௠உடà¯à®ªà®Ÿ 11 கோடிப௠பேர௠இதனைப௠பேசà¯à®•ிறாரà¯à®•ளà¯. உரà¯à®¤à¯ பாகிஸà¯à®¤à®¾à®©à®¿à®©à¯ அரசகரà¯à®® மொழியாகவà¯à®®à¯, இநà¯à®¤à®¿à®¯à®¾à®µà®¿à®©à¯ அரசகரà¯à®® மொழிகளà¯à®³à¯ ஒனà¯à®±à®¾à®•வà¯à®®à¯ விளஙà¯à®•à¯à®•ிறதà¯. اردو Ûندوآریائی زبانوں Ú©ÛŒ Ûندويورپی شاخ Ú©ÛŒ ایک زبان ÛÛ’ جو تيرھويں صدی ميں بر صغير ميں پيدا Ûوئی Ù€ اردو پاکستان Ú©ÛŒ سرکاری زبان ÛÛ’ اور بھارت Ú©ÛŒ سرکاری زبانوں ميں سے ايک ÛÛ’Û” اردو بھارت ميں 5 کروڑ اور پاکستان ميں 1 کروڑ لوگوں Ú©ÛŒ مادری زبان ÛÛ’ مگر اسے بھارت اور پاکستان Ú©Û’ تقریباً 50 کروڑ لوگ بول اور سمجھ سکتے ھیں Û” جن میں سے تقریباً 10.5 کروڑ لوگ اسے Ø¨Ø§Ù‚Ø§Ø¹Ø¯Û Ø¨ÙˆÙ„ØªÛ’ ھیں۔ بايثون ===== **بايثون** لغة برمجة حديثة بسيطة، واضحة، سريعة ØŒ تستخدم أسلوب البرمجة الكائنية (OOP) وقابلة للتطوير Ø¨Ø§Ù„Ø¥Ø¶Ø§ÙØ© إلى أنها مجانية Ùˆ Ù…ÙØªÙˆØ­Ø© المصدر. صÙÙ†ÙØª بالأساس كلغة ØªÙØ³ÙŠØ±ÙŠØ© ØŒ بايثون مصممة أصلاً للأداء بعض المهام الخاصة أو المحدودة. إلا أنه يمكن استخدامها بايثون لإنجاز المشاريع الضخمه كأي لغة برمجية أخرى، غالباً ما ÙŠÙنصح المبتدئين ÙÙŠ ميدان البرمجة بتعلم هذه اللغة لأنها من بين أسهل اللغات البرمجية تعلماً. |||||||||||||||||||||||||||||THIS SHOULD BE RTL||||||||||||||||||||||||| (نشأت بايثون ÙÙŠ مركز CWI (مركز العلوم والحاسب الآلي) بأمستردام على يد جويدو ÙØ§Ù† Ø±ÙØ²ÙˆÙ…. تم تطويرها بلغة C. أطلق ÙØ§Ù† Ø±ÙØ²ÙˆÙ… اسم "بايثون" على لغته تعبيرًا عن إعجابه بÙÙØ±Ù‚ÙŽØ© مسرحية هزلية شهيرة من بريطانيا، كانت تطلق على Ù†ÙØ³Ù‡Ø§ اسم مونتي بايثون Monty Python. تتميز بايثون بمجتمعها النشط ØŒ كما أن لها الكثير من المكتبات البرمجية ذات الأغراض الخاصة والتي برمجها أشخاص من مجتمع هذه اللغة ØŒ مثلاً مكتبة PyGame التي ØªÙˆÙØ± مجموعه من الوظائ٠من اجل برمجة الالعاب. ويمكن لبايثون التعامل مع العديد من أنواع قواعد البيانات مثل MySQL وغيره. ##أمثلة مثال Hello World! print "Hello World!" مثال لاستخراج المضروب Factorial : num = 1 x = raw_input('Insert the number please ') x = int(x) if x > 69: print 'Math Error !' else: while x > 1: num *= x x = x-1 print num ##وصلات خارجية * [الموقع الرسمي للغة بايثون](http://www.python.org) بذرة حاس **Ðедвард «Ðед» ФландерÑ** (Nedward «Ned» Flanders) — вымышленный перÑонаж мультÑериала «[СимпÑоны][]», озвученный Гарри Ширером. Он и его ÑÐµÐ¼ÑŒÑ Ð¶Ð¸Ð²ÑƒÑ‚ по ÑоÑедÑтву от Ñемьи СимпÑонов. Ðабожный хриÑтианин, Ðед ÑвлÑетÑÑ Ð¾Ð´Ð½Ð¸Ð¼ из Ñтолпов морали Спрингфилда. Ð’ Ñпизоде «Alone Again, Natura-Diddily» он овдовел, его жена Мод погибла в результате неÑчаÑтного ÑлучаÑ. Ðед был одним из первых перÑонажей в мультÑериале, который не был членом Ñемьи СимпÑонов. ÐÐ°Ñ‡Ð¸Ð½Ð°Ñ Ñ Ð¿ÐµÑ€Ð²Ñ‹Ñ… Ñерий, он регулÑрно поÑвлÑетÑÑ Ð² «СимпÑонах». СчитаетÑÑ, что Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ð±Ñ‹Ð» назван в чеÑть улицы *Northeast Flanders St.* в [Портленде](http://www.portland.gov), Орегон, родном городе ÑÐ¾Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ Ð¼ÑƒÐ»ÑŒÑ‚Ñериала МÑтта Грейнинга]]. ÐадпиÑÑŒ на указателе улицы *NE Flanders St.* хулиганы чаÑто иÑправлÑли на _NED Flanders St._ Markdown-2.6.9/tests/misc/blank-block-quote.html0000644000076500000240000000007713064117426022235 0ustar waylanstaff00000000000000

    aaaaaaaaaaa

    bbbbbbbbbbb

    Markdown-2.6.9/tests/misc/blank-block-quote.txt0000644000076500000240000000003613064117426022103 0ustar waylanstaff00000000000000 aaaaaaaaaaa > bbbbbbbbbbb Markdown-2.6.9/tests/misc/blank_lines_in_codeblocks.html0000644000076500000240000000065113064117426024060 0ustar waylanstaff00000000000000

    Preserve blank lines in code blocks with tabs:

    a code block
    
    two tabbed lines
    
    
    three tabbed lines
    
    
    
    four tabbed lines
    
    
    
    
    five tabbed lines
    
    
    
    
    
    six tabbed lines
    
    
    
    
    
    
    End of tabbed block
    

    And without tabs:

    a code block
    
    two blank lines
    
    
    three blank lines
    
    
    
    four blank lines
    
    
    
    
    five blank lines
    
    
    
    
    
    six blank lines
    
    
    
    
    
    
    End of block
    

    End of document

    Markdown-2.6.9/tests/misc/blank_lines_in_codeblocks.txt0000644000076500000240000000102413064117426023726 0ustar waylanstaff00000000000000Preserve blank lines in code blocks with tabs: a code block two tabbed lines three tabbed lines four tabbed lines five tabbed lines six tabbed lines End of tabbed block And without tabs: a code block two blank lines three blank lines four blank lines five blank lines six blank lines End of block End of documentMarkdown-2.6.9/tests/misc/block_html5.html0000644000076500000240000000044513064117426021125 0ustar waylanstaff00000000000000

    Hello :-)

    Caption

    Some footer

    Markdown-2.6.9/tests/misc/block_html5.txt0000644000076500000240000000044413064117426020777 0ustar waylanstaff00000000000000

    Hello :-)

    Caption

    Some footer

    Markdown-2.6.9/tests/misc/block_html_attr.html0000644000076500000240000000147113064117426022072 0ustar waylanstaff00000000000000
    Raw HTML processing should not confuse this with the blockquote below

    Header2

    Header3

    Paragraph

    Header3

    Paragraph

    Paragraph

    Paragraph

    linktext

    Markdown-2.6.9/tests/misc/block_html_attr.txt0000644000076500000240000000146713064117426021752 0ustar waylanstaff00000000000000
    Raw HTML processing should not confuse this with the blockquote below

    Header2

    Header3

    Paragraph

    Header3

    Paragraph

    Paragraph

    Paragraph

    linktext

    Markdown-2.6.9/tests/misc/block_html_simple.html0000644000076500000240000000010213064117426022377 0ustar waylanstaff00000000000000

    foo

    • bar

    • baz

    Markdown-2.6.9/tests/misc/block_html_simple.txt0000644000076500000240000000010213064117426022252 0ustar waylanstaff00000000000000

    foo

    • bar

    • baz

    Markdown-2.6.9/tests/misc/blockquote-below-paragraph.html0000644000076500000240000000032613064117426024141 0ustar waylanstaff00000000000000

    Paragraph

    Block quote Yep

    Paragraph

    no space Nope

    Paragraph one

    blockquote More blockquote.

    Markdown-2.6.9/tests/misc/blockquote-below-paragraph.txt0000644000076500000240000000014613064117426024014 0ustar waylanstaff00000000000000Paragraph > Block quote > Yep Paragraph >no space >Nope Paragraph one > blockquote More blockquote. Markdown-2.6.9/tests/misc/blockquote-hr.html0000644000076500000240000000062213064117426021476 0ustar waylanstaff00000000000000

    This is a paragraph.


    Block quote with horizontal lines.


    Double block quote.


    End of the double block quote.

    A new paragraph. With multiple lines. Even a lazy line.


    The last line.

    foo

    bar



    baz

    Markdown-2.6.9/tests/misc/blockquote-hr.txt0000644000076500000240000000037613064117426021357 0ustar waylanstaff00000000000000This is a paragraph. --- > Block quote with horizontal lines. > --- > > Double block quote. > > --- > > End of the double block quote. > A new paragraph. > With multiple lines. Even a lazy line. > --- > The last line. foo > bar > *** --- > baz Markdown-2.6.9/tests/misc/blockquote.html0000644000076500000240000000121713064117426021070 0ustar waylanstaff00000000000000

    blockquote with no whitespace before >.

    foo

    blockquote with one space before the >.

    bar

    blockquote with 2 spaces.

    baz

    this has three spaces so its a paragraph.

    blah

    > this one had four so it's a code block.
    

    this nested blockquote has 0 on level one and 3 (one after the first > + 2 more) on level 2.

    and this has 4 on level 2 - another code block.

    Markdown-2.6.9/tests/misc/blockquote.txt0000644000076500000240000000061313064117426020742 0ustar waylanstaff00000000000000> blockquote with no whitespace before `>`. foo > blockquote with one space before the `>`. bar > blockquote with 2 spaces. baz > this has three spaces so its a paragraph. blah > this one had four so it's a code block. > > this nested blockquote has 0 on level one and 3 (one after the first `>` + 2 more) on level 2. > > and this has 4 on level 2 - another code block. Markdown-2.6.9/tests/misc/bold_links.html0000644000076500000240000000010213064117426021030 0ustar waylanstaff00000000000000

    bold link

    Markdown-2.6.9/tests/misc/bold_links.txt0000644000076500000240000000004413064117426020710 0ustar waylanstaff00000000000000**bold [link](http://example.com)** Markdown-2.6.9/tests/misc/br.html0000644000076500000240000000103613064117426017322 0ustar waylanstaff00000000000000

    Output:

    <p>Some of these words <em>are emphasized</em>.
    Some of these words <em>are emphasized also</em>.</p>
    
    <p>Use two asterisks for <strong>strong emphasis</strong>.
    Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    

    Lists

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, +, and -) as list markers. These three markers are interchangable; this:

    Markdown-2.6.9/tests/misc/br.txt0000644000076500000240000000064213064117426017177 0ustar waylanstaff00000000000000Output:

    Some of these words are emphasized. Some of these words are emphasized also.

    Use two asterisks for strong emphasis. Or, if you prefer, use two underscores instead.

    ## Lists ## Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`, `+`, and `-`) as list markers. These three markers are interchangable; this: Markdown-2.6.9/tests/misc/bracket_re.html0000644000076500000240000000355113064117426021024 0ustar waylanstaff00000000000000

    [x xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx

    Markdown-2.6.9/tests/misc/bracket_re.txt0000644000076500000240000000354413064117426020701 0ustar waylanstaff00000000000000 [x xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx Markdown-2.6.9/tests/misc/brackets-in-img-title.html0000644000076500000240000000101213064117426023004 0ustar waylanstaff00000000000000

    alt alt alt

    alt alt

    alt alt alt alt

    Markdown-2.6.9/tests/misc/brackets-in-img-title.txt0000644000076500000240000000047113064117426022667 0ustar waylanstaff00000000000000![alt](local-img.jpg) ![alt](local-img.jpg "") ![alt](local-img.jpg "normal title") ![alt](local-img.jpg "(just title in brackets)") ![alt](local-img.jpg "title with brackets (I think)") ![alt](local-img.jpg "(") ![alt](local-img.jpg "(open only") ![alt](local-img.jpg ")") ![alt](local-img.jpg "close only)") Markdown-2.6.9/tests/misc/code-first-line.html0000644000076500000240000000006613064117426021705 0ustar waylanstaff00000000000000
    print "This is a code block."
    
    Markdown-2.6.9/tests/misc/code-first-line.txt0000644000076500000240000000004213064117426021552 0ustar waylanstaff00000000000000 print "This is a code block." Markdown-2.6.9/tests/misc/comments.html0000644000076500000240000000017113064117426020543 0ustar waylanstaff00000000000000

    X<0

    X>0

    as if

    no blank line

    Markdown-2.6.9/tests/misc/comments.txt0000644000076500000240000000012313064117426020413 0ustar waylanstaff00000000000000X<0 X>0
    as if
    __no blank line__ Markdown-2.6.9/tests/misc/CRLF_line_ends.html0000644000076500000240000000003313064117426021461 0ustar waylanstaff00000000000000

    foo

    bar
    Markdown-2.6.9/tests/misc/CRLF_line_ends.txt0000644000076500000240000000003313064117426021334 0ustar waylanstaff00000000000000foo
    bar
    Markdown-2.6.9/tests/misc/div.html0000644000076500000240000000012313064117426017475 0ustar waylanstaff00000000000000

    And now in uppercase:

    foo
    Markdown-2.6.9/tests/misc/div.txt0000644000076500000240000000011613064117426017352 0ustar waylanstaff00000000000000 And now in uppercase:
    foo
    Markdown-2.6.9/tests/misc/em-around-links.html0000644000076500000240000000140513064117426021724 0ustar waylanstaff00000000000000

    Title

    Python in Markdown by some great folks - This does work as expected.

    Markdown-2.6.9/tests/misc/em-around-links.txt0000644000076500000240000000113013064117426021572 0ustar waylanstaff00000000000000# Title - *[Python in Markdown](https://pythonhosted.org/Markdown/) by some great folks* - This *does* work as expected. - _[Python in Markdown](https://pythonhosted.org/Markdown/) by some great folks_ - This *does* work as expected. - [_Python in Markdown_](https://pythonhosted.org/Markdown/) by some great folks - This *does* work as expected. - [_Python in Markdown_](https://pythonhosted.org/Markdown/) _by some great folks_ - This *does* work as expected. _[Python in Markdown](https://pythonhosted.org/Markdown/) by some great folks_ - This *does* work as expected. Markdown-2.6.9/tests/misc/em_strong.html0000644000076500000240000000043413064117426020715 0ustar waylanstaff00000000000000

    One asterisk: *

    One underscore: _

    Two asterisks: **

    With spaces: * *

    Two underscores __

    with spaces: _ _

    three asterisks: ***

    with spaces: * * *

    three underscores: ___

    with spaces: _ _ _

    One char: a

    Markdown-2.6.9/tests/misc/em_strong.txt0000644000076500000240000000032313064117426020565 0ustar waylanstaff00000000000000One asterisk: * One underscore: _ Two asterisks: ** With spaces: * * Two underscores __ with spaces: _ _ three asterisks: *** with spaces: * * * three underscores: ___ with spaces: _ _ _ One char: _a_ Markdown-2.6.9/tests/misc/em_strong_complex.html0000644000076500000240000000110213064117426022435 0ustar waylanstaff00000000000000

    test test test test

    test test test test

    test

    test_

    test test_

    test test

    test_test test_test

    test test test test

    test test test test

    *test

    test

    test*

    test test

    testtest testtest

    Markdown-2.6.9/tests/misc/em_strong_complex.txt0000644000076500000240000000040313064117426022313 0ustar waylanstaff00000000000000___test test__ test test_ ___test test_ test test__ ___test___ __test___ ___test_ test___ ___test_ test__ _test_test test_test_ ***test test** test test* ***test test* test test** **test* ***test*** **test*** ***test* test** *test*test test*test*Markdown-2.6.9/tests/misc/email.html0000644000076500000240000000156313064117426020013 0ustar waylanstaff00000000000000

    asdfasdfadsfasd yuri@freewisdom.org or you can say instead yuri@freewisdom.org

    bob&sue@example.com

    Markdown-2.6.9/tests/misc/email.txt0000644000076500000240000000016313064117426017661 0ustar waylanstaff00000000000000 asdfasdfadsfasd or you can say instead Markdown-2.6.9/tests/misc/escaped_chars_in_js.html0000644000076500000240000000072313064117426022667 0ustar waylanstaff00000000000000

    [javascript protected email address]

    Markdown-2.6.9/tests/misc/escaped_chars_in_js.txt0000644000076500000240000000071513064117426022543 0ustar waylanstaff00000000000000[javascript protected email address] Markdown-2.6.9/tests/misc/escaped_links.html0000644000076500000240000000032413064117426021522 0ustar waylanstaff00000000000000

    Backslashed in links:

    q=go:GO\:0000307

    q=go:GO\:0000308

    a \non-escaped char.

    Markdown-2.6.9/tests/misc/escaped_links.txt0000644000076500000240000000025613064117426021401 0ustar waylanstaff00000000000000Backslashed in links: [q=go:GO\\:0000307](/query?q=go:GO\\:0000307) [q=go:GO\\:0000308][foo] [foo]: /query?q=go:GO\:0000308 "/query?q=go:GO\:0000308" a \non-escaped char.Markdown-2.6.9/tests/misc/funky-list.html0000644000076500000240000000042213064117426021022 0ustar waylanstaff00000000000000
    1. this starts a list with numbers
    2. this will show as number "2"
    3. this will show as number "3."
    4. any number, +, -, or * will keep the list going.

    aaaaaaaaaaaaaaa

    • now a normal list
    • and more
    Markdown-2.6.9/tests/misc/funky-list.txt0000644000076500000240000000031313064117426020674 0ustar waylanstaff000000000000001. this starts a list *with* numbers + this will show as number "2" * this will show as number "3." 9. any number, +, -, or * will keep the list going. aaaaaaaaaaaaaaa - now a normal list - and more Markdown-2.6.9/tests/misc/h1.html0000644000076500000240000000010513064117426017223 0ustar waylanstaff00000000000000

    Header

    Header 2

    H3

    H1

    H2

    Markdown-2.6.9/tests/misc/h1.txt0000644000076500000240000000006713064117426017105 0ustar waylanstaff00000000000000Header ------ Header 2 ======== ### H3 H1 = H2 -- Markdown-2.6.9/tests/misc/hash.html0000644000076500000240000000014313064117426017640 0ustar waylanstaff00000000000000

    a

    #!/usr/bin/python
    hello

    a

    !/usr/bin/python
    hello

    a

    Markdown-2.6.9/tests/misc/hash.txt0000644000076500000240000000012113064117426017507 0ustar waylanstaff00000000000000a
    #!/usr/bin/python
    hello
    a
    !/usr/bin/python
    hello
    a Markdown-2.6.9/tests/misc/header-in-lists.html0000644000076500000240000000052413064117426021710 0ustar waylanstaff00000000000000

    Tight List:

    • Header1

      Line 1-2 - not a header or paragraph!
    • Header2

      Line 2-2 - not a header or paragraph!

    Loose List:

    • Header1

      Line 1-2 - a paragraph

    • Header2

      Line 2-2 - a paragraph

    Markdown-2.6.9/tests/misc/header-in-lists.txt0000644000076500000240000000031213064117426021556 0ustar waylanstaff00000000000000Tight List: * #Header1 Line 1-2 - **not** a header *or* paragraph! * #Header2 Line 2-2 - not a header or paragraph! Loose List: * #Header1 Line 1-2 - *a* paragraph * #Header2 Line 2-2 - a paragraph Markdown-2.6.9/tests/misc/headers.html0000644000076500000240000000034313064117426020332 0ustar waylanstaff00000000000000

    Hello world

    Line 2 Line 3

    [Markdown][5]

    Markdown

    [5]: http://foo.com/

    Issue #1: Markdown

    Text

    Header

    Some other text

    Markdown-2.6.9/tests/misc/headers.txt0000644000076500000240000000024313064117426020204 0ustar waylanstaff00000000000000### Hello world Line 2 Line 3 # [Markdown][5] # [Markdown](http://some.link.com/) # [5]: http://foo.com/ # Issue #1: Markdown Text # Header Some other text Markdown-2.6.9/tests/misc/hline.html0000644000076500000240000000004013064117426020010 0ustar waylanstaff00000000000000

    Header

    Next line

    Markdown-2.6.9/tests/misc/hline.txt0000644000076500000240000000002513064117426017666 0ustar waylanstaff00000000000000 #Header Next line Markdown-2.6.9/tests/misc/html-comments.html0000644000076500000240000000011413064117426021502 0ustar waylanstaff00000000000000

    Here is HTML and once more

    Markdown-2.6.9/tests/misc/html-comments.txt0000644000076500000240000000010613064117426021356 0ustar waylanstaff00000000000000Here is HTML and once more

    Markdown-2.6.9/tests/misc/html.html0000644000076500000240000000144713064117426017671 0ustar waylanstaff00000000000000

    Block level html

    Some inline stuff.

    Now some arbitrary tags.

    More block level html.
    Html with various attributes.
    Div with a blank line in the middle.
    This gets treated as HTML.

    And of course .

    this . [this ) Some funky inline stuff with markdown escaping syntax. And now a line with only an opening bracket: < And one with other stuff but no closing bracket: < foo Markdown-2.6.9/tests/misc/image-2.html0000644000076500000240000000016013064117426020135 0ustar waylanstaff00000000000000

    link!

    link

    Markdown-2.6.9/tests/misc/image-2.txt0000644000076500000240000000010013064117426020002 0ustar waylanstaff00000000000000[*link!*](http://src.com/) *[link](http://www.freewisdom.org)* Markdown-2.6.9/tests/misc/image.html0000644000076500000240000000045613064117426020006 0ustar waylanstaff00000000000000

    Poster

    Poster

    Blank

    ![Fail](http://humane man.jpg "The most humane man.")

    ![Fail](http://humane man.jpg)

    Markdown-2.6.9/tests/misc/image.txt0000644000076500000240000000034013064117426017651 0ustar waylanstaff00000000000000 ![Poster](http://humane_man.jpg "The most humane man.") ![Poster][] [Poster]:http://humane_man.jpg "The most humane man." ![Blank]() ![Fail](http://humane man.jpg "The most humane man.") ![Fail](http://humane man.jpg) Markdown-2.6.9/tests/misc/image_in_links.html0000644000076500000240000000013013064117426021661 0ustar waylanstaff00000000000000

    altname

    Markdown-2.6.9/tests/misc/image_in_links.txt0000644000076500000240000000007113064117426021540 0ustar waylanstaff00000000000000 [![altname](path/to/img_thumb.png)](path/to/image.png) Markdown-2.6.9/tests/misc/ins-at-start-of-paragraph.html0000644000076500000240000000011413064117426023606 0ustar waylanstaff00000000000000

    Hello, fellow developer this ins should be wrapped in a p.

    Markdown-2.6.9/tests/misc/ins-at-start-of-paragraph.txt0000644000076500000240000000010613064117426023462 0ustar waylanstaff00000000000000Hello, fellow developer this ins should be wrapped in a p. Markdown-2.6.9/tests/misc/inside_html.html0000644000076500000240000000006113064117426021213 0ustar waylanstaff00000000000000

    ok?

    Markdown-2.6.9/tests/misc/inside_html.txt0000644000076500000240000000003613064117426021070 0ustar waylanstaff00000000000000 __ok__? Markdown-2.6.9/tests/misc/japanese.html0000644000076500000240000000565713064117426020522 0ustar waylanstaff00000000000000

    パイソン (Python)

    Python(パイソン)ã¯ã€Guido van Rossum ã«ã‚ˆã£ã¦ä½œã‚‰ã‚ŒãŸã‚ªãƒ¼ãƒ—ンソースã®ã‚ªãƒ–ジェクト指å‘スクリプト言語。Perlã¨ã¨ã‚‚ã«æ¬§ç±³ã§åºƒãæ™®åŠã—ã¦ã„る。イギリスã®ãƒ†ãƒ¬ãƒ“å±€ BBC ãŒè£½ä½œã—ãŸã‚³ãƒ¡ãƒ‡ã‚£ç•ªçµ„『空飛ã¶ãƒ¢ãƒ³ãƒ†ã‚£ãƒ»ãƒ‘イソンã€ã«ã¡ãªã‚“ã§å付ã‘られãŸã€‚ (Pythonã«ã¯ã€çˆ¬è™«é¡žã®ãƒ‹ã‚·ã‚­ãƒ˜ãƒ“ã®æ„味ãŒã‚りã€Python言語ã®ãƒžã‚¹ã‚³ãƒƒãƒˆã‚„アイコンã¨ã—ã¦ä½¿ã‚れるã“ã¨ãŒã‚る。)

    概è¦

    プログラミング言語 Python ã¯åˆå¿ƒè€…ã‹ã‚‰å°‚門家ã¾ã§å¹…広ã„ユーザ層をç²å¾—ã—ã¦ã„ã‚‹ã€‚åˆ©ç”¨ç›®çš„ã¯æ±Žç”¨ã§ã€æ–¹å‘性ã¨ã—ã¦ã¯Javaã«è¿‘ã„。ãŸã ã—ã€æœ€åˆã‹ã‚‰ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯åˆ©ç”¨ã‚’メインã¨ã—ã¦è€ƒãˆã‚‰ã‚Œã¦ã„ã‚‹Javaよりセキュリティã«ã¤ã„ã¦ã¯ã‚„や寛大ã§ã‚る。多ãã®ãƒ—ラットフォームをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šï¼ˆâ‡’動作ã™ã‚‹ãƒ—ラットフォーム)ã€è±Šå¯Œãªãƒ©ã‚¤ãƒ–ラリãŒã‚ã‚‹ã“ã¨ã‹ã‚‰ã€ç”£æ¥­ç•Œã§ã‚‚利用ãŒå¢—ãˆã¤ã¤ã‚る。ã¾ãŸã€Pythonã¯ç´”粋ãªãƒ—ログラミング言語ã®ã»ã‹ã«ã‚‚ã€å¤šãã®ç•°ãªã‚‹è¨€èªžã§æ›¸ã‹ã‚ŒãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’ã¾ã¨ã‚る糊言語ã®ã²ã¨ã¤ã¨ã—ã¦ä½ç½®ã¥ã‘ã‚‹ã“ã¨ãŒã§ãる。実際Pythonã¯å¤šãã®å•†ç”¨ã‚¢ãƒ—リケーションã§ã‚¹ã‚¯ãƒªãƒ—ト言語ã¨ã—ã¦æŽ¡ç”¨ã•れã¦ã„る(⇒Pythonを使ã£ã¦ã„る製å“ã‚ã‚‹ã„ã¯ã‚½ãƒ•トウェアã®ä¸€è¦§ï¼‰ã€‚豊富ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ã‚‚ã¡ã€Unicodeã«ã‚ˆã‚‹æ–‡å­—列æ“作をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€æ—¥æœ¬èªžå‡¦ç†ã‚‚標準ã§å¯èƒ½ã§ã‚る。

    Python ã¯åŸºæœ¬çš„ã«ã‚¤ãƒ³ã‚¿ãƒ—リタ上ã§å®Ÿè¡Œã•れるã“ã¨ã‚’念頭ã«ãŠã„ã¦è¨­è¨ˆã•れã¦ãŠã‚Šã€ä»¥ä¸‹ã®ã‚ˆã†ãªç‰¹å¾´ã‚’ã‚‚ã£ã¦ã„ã‚‹:

    • å‹•çš„ãªåž‹ä»˜ã‘。
    • オブジェクトã®ãƒ¡ãƒ³ãƒã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãŒåˆ¶é™ã•れã¦ã„ãªã„。(属性や専用ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ックを実装ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦åˆ¶é™ã¯å¯èƒ½ã€‚)
    • モジュールã€ã‚¯ãƒ©ã‚¹ã€ã‚ªãƒ–ジェクト等ã®è¨€èªžã®è¦ç´ ãŒå†…部ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚りã€ãƒªãƒ•レクションを利用ã—ãŸè¨˜è¿°ãŒå¯èƒ½ã€‚

    ã¾ãŸã€Pythonã§ã¯ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã«ã‚ˆã‚Šãƒ–ロックを指定ã™ã‚‹æ§‹æ–‡ã‚’採用ã—ã¦ã„る(⇒オフサイドルール)。ã“ã®æ§‹æ–‡ã¯Pythonã«æ…£ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ã‹ã‚‰ã¯ç§°è³›ã‚’ã‚‚ã£ã¦å—ã‘入れられã¦ã„ã‚‹ãŒã€ä»–ã®è¨€èªžã®ãƒ¦ãƒ¼ã‚¶ã‹ã‚‰ã¯æ‰¹åˆ¤ã‚‚多ã„。ã“ã®ã»ã‹ã«ã‚‚ã€å¤§ãã™ãŽã‚‹å®Ÿè¡Œãƒ•ァイルやã€Javaã«æ¯”ã¹ã¦é…ã„処ç†é€Ÿåº¦ãªã©ãŒæ¬ ç‚¹ã¨ã—ã¦æŒ‡æ‘˜ã•れã¦ã„る。ã—ã‹ã— プロトタイピング ã®éš›ã«ã¯ã“れらã®ç‚¹ã¯ã•ã—ã¦å•題ã¨ã¯ãªã‚‰ãªã„ã“ã¨ã‹ã‚‰ã€ç ”究開発部門ã§ã¯é »ç¹ã«åˆ©ç”¨ã•れã¦ã„る。

    Markdown-2.6.9/tests/misc/japanese.txt0000644000076500000240000000545413064117426020370 0ustar waylanstaff00000000000000パイソン (Python) ======= **Python**(パイソン)ã¯ã€[Guido van Rossum](http://en.wikipedia.org/wiki/Guido_van_Rossum) ã«ã‚ˆã£ã¦ä½œã‚‰ã‚ŒãŸã‚ªãƒ¼ãƒ—ンソースã®ã‚ªãƒ–ジェクト指å‘スクリプト言語。[Perl](http://ja.wikipedia.org/wiki/Perl)ã¨ã¨ã‚‚ã«æ¬§ç±³ã§åºƒãæ™®åŠã—ã¦ã„る。イギリスã®ãƒ†ãƒ¬ãƒ“å±€ BBC ãŒè£½ä½œã—ãŸã‚³ãƒ¡ãƒ‡ã‚£ç•ªçµ„『空飛ã¶ãƒ¢ãƒ³ãƒ†ã‚£ãƒ»ãƒ‘イソンã€ã«ã¡ãªã‚“ã§å付ã‘られãŸã€‚ (Pythonã«ã¯ã€çˆ¬è™«é¡žã®ãƒ‹ã‚·ã‚­ãƒ˜ãƒ“ã®æ„味ãŒã‚りã€Python言語ã®ãƒžã‚¹ã‚³ãƒƒãƒˆã‚„アイコンã¨ã—ã¦ä½¿ã‚れるã“ã¨ãŒã‚る。) ## æ¦‚è¦ ãƒ—ãƒ­ã‚°ãƒ©ãƒŸãƒ³ã‚°è¨€èªž Python ã¯åˆå¿ƒè€…ã‹ã‚‰å°‚門家ã¾ã§å¹…広ã„ユーザ層をç²å¾—ã—ã¦ã„ã‚‹ã€‚åˆ©ç”¨ç›®çš„ã¯æ±Žç”¨ã§ã€æ–¹å‘性ã¨ã—ã¦ã¯Javaã«è¿‘ã„。ãŸã ã—ã€æœ€åˆã‹ã‚‰ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯åˆ©ç”¨ã‚’メインã¨ã—ã¦è€ƒãˆã‚‰ã‚Œã¦ã„ã‚‹Javaよりセキュリティã«ã¤ã„ã¦ã¯ã‚„や寛大ã§ã‚る。多ãã®ãƒ—ラットフォームをサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šï¼ˆâ‡’[動作ã™ã‚‹ãƒ—ラットフォーム](#somelink))ã€è±Šå¯Œãªãƒ©ã‚¤ãƒ–ラリãŒã‚ã‚‹ã“ã¨ã‹ã‚‰ã€ç”£æ¥­ç•Œã§ã‚‚利用ãŒå¢—ãˆã¤ã¤ã‚る。ã¾ãŸã€Pythonã¯ç´”粋ãªãƒ—ログラミング言語ã®ã»ã‹ã«ã‚‚ã€å¤šãã®ç•°ãªã‚‹è¨€èªžã§æ›¸ã‹ã‚ŒãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’ã¾ã¨ã‚る糊言語ã®ã²ã¨ã¤ã¨ã—ã¦ä½ç½®ã¥ã‘ã‚‹ã“ã¨ãŒã§ãる。実際Pythonã¯å¤šãã®å•†ç”¨ã‚¢ãƒ—リケーションã§ã‚¹ã‚¯ãƒªãƒ—ト言語ã¨ã—ã¦æŽ¡ç”¨ã•れã¦ã„る(⇒Pythonを使ã£ã¦ã„る製å“ã‚ã‚‹ã„ã¯ã‚½ãƒ•トウェアã®ä¸€è¦§ï¼‰ã€‚豊富ãªãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ã‚‚ã¡ã€Unicodeã«ã‚ˆã‚‹æ–‡å­—列æ“作をサãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€æ—¥æœ¬èªžå‡¦ç†ã‚‚標準ã§å¯èƒ½ã§ã‚る。 Python ã¯åŸºæœ¬çš„ã«ã‚¤ãƒ³ã‚¿ãƒ—リタ上ã§å®Ÿè¡Œã•れるã“ã¨ã‚’念頭ã«ãŠã„ã¦è¨­è¨ˆã•れã¦ãŠã‚Šã€ä»¥ä¸‹ã®ã‚ˆã†ãªç‰¹å¾´ã‚’ã‚‚ã£ã¦ã„ã‚‹: * å‹•çš„ãªåž‹ä»˜ã‘。 * オブジェクトã®ãƒ¡ãƒ³ãƒã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãŒåˆ¶é™ã•れã¦ã„ãªã„。(属性や専用ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ックを実装ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦åˆ¶é™ã¯å¯èƒ½ã€‚) * モジュールã€ã‚¯ãƒ©ã‚¹ã€ã‚ªãƒ–ジェクト等ã®è¨€èªžã®è¦ç´ ãŒå†…部ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã‚りã€ãƒªãƒ•レクションを利用ã—ãŸè¨˜è¿°ãŒå¯èƒ½ã€‚ ã¾ãŸã€Pythonã§ã¯ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã«ã‚ˆã‚Šãƒ–ロックを指定ã™ã‚‹æ§‹æ–‡ã‚’採用ã—ã¦ã„る(⇒[オフサイドルール](#jklj))。ã“ã®æ§‹æ–‡ã¯Pythonã«æ…£ã‚ŒãŸãƒ¦ãƒ¼ã‚¶ã‹ã‚‰ã¯ç§°è³›ã‚’ã‚‚ã£ã¦å—ã‘入れられã¦ã„ã‚‹ãŒã€ä»–ã®è¨€èªžã®ãƒ¦ãƒ¼ã‚¶ã‹ã‚‰ã¯æ‰¹åˆ¤ã‚‚多ã„。ã“ã®ã»ã‹ã«ã‚‚ã€å¤§ãã™ãŽã‚‹å®Ÿè¡Œãƒ•ァイルやã€Javaã«æ¯”ã¹ã¦é…ã„処ç†é€Ÿåº¦ãªã©ãŒæ¬ ç‚¹ã¨ã—ã¦æŒ‡æ‘˜ã•れã¦ã„る。ã—ã‹ã— **プロトタイピング** ã®éš›ã«ã¯ã“れらã®ç‚¹ã¯ã•ã—ã¦å•題ã¨ã¯ãªã‚‰ãªã„ã“ã¨ã‹ã‚‰ã€ç ”究開発部門ã§ã¯é »ç¹ã«åˆ©ç”¨ã•れã¦ã„る。 Markdown-2.6.9/tests/misc/lazy-block-quote.html0000644000076500000240000000023213064117426022116 0ustar waylanstaff00000000000000

    Line one of lazy block quote. Line two of lazy block quote.

    Line one of paragraph two. Line two of paragraph two.

    Markdown-2.6.9/tests/misc/lazy-block-quote.txt0000644000076500000240000000016713064117426022000 0ustar waylanstaff00000000000000> Line one of lazy block quote. Line two of lazy block quote. > Line one of paragraph two. Line two of paragraph two. Markdown-2.6.9/tests/misc/link-with-parenthesis.html0000644000076500000240000000021513064117426023146 0ustar waylanstaff00000000000000

    ZIP archives

    Markdown-2.6.9/tests/misc/link-with-parenthesis.txt0000644000076500000240000000016613064117426023026 0ustar waylanstaff00000000000000[ZIP archives](http://en.wikipedia.org/wiki/ZIP_(file_format) "ZIP (file format) - Wikipedia, the free encyclopedia") Markdown-2.6.9/tests/misc/lists.html0000644000076500000240000000064613064117426020063 0ustar waylanstaff00000000000000
    • A multi-paragraph list, unindented.

    Simple tight list

    • Uno
    • Due
    • Tri

    A singleton tight list:

    • Uno

    A lose list:

    • One

    • Two

    • Three

    A lose list with paragraphs

    • One one one one

      one one one one

    • Two two two two

    Markdown-2.6.9/tests/misc/lists.txt0000644000076500000240000000035513064117426017733 0ustar waylanstaff00000000000000 * A multi-paragraph list, unindented. Simple tight list * Uno * Due * Tri A singleton tight list: * Uno A lose list: * One * Two * Three A lose list with paragraphs * One one one one one one one one * Two two two two Markdown-2.6.9/tests/misc/lists2.html0000644000076500000240000000011413064117426020133 0ustar waylanstaff00000000000000
    • blah blah blah sdf asdf asdf asdf asdf asda asdf asdfasd
    Markdown-2.6.9/tests/misc/lists2.txt0000644000076500000240000000007313064117426020012 0ustar waylanstaff00000000000000* blah blah blah sdf asdf asdf asdf asdf asda asdf asdfasd Markdown-2.6.9/tests/misc/lists3.html0000644000076500000240000000012413064117426020135 0ustar waylanstaff00000000000000
    • blah blah blah sdf asdf asdf asdf asdf asda asdf asdfasd
    Markdown-2.6.9/tests/misc/lists3.txt0000644000076500000240000000010313064117426020005 0ustar waylanstaff00000000000000* blah blah blah sdf asdf asdf asdf asdf asda asdf asdfasd Markdown-2.6.9/tests/misc/lists4.html0000644000076500000240000000012713064117426020141 0ustar waylanstaff00000000000000
    • item1
    • item2
      1. Number 1
      2. Number 2
    Markdown-2.6.9/tests/misc/lists4.txt0000644000076500000240000000006113064117426020011 0ustar waylanstaff00000000000000 * item1 * item2 1. Number 1 2. Number 2 Markdown-2.6.9/tests/misc/lists5.html0000644000076500000240000000036713064117426020150 0ustar waylanstaff00000000000000

    This is a test of a block quote With just two lines

    A paragraph

    This is a more difficult case With a list item inside the quote

    • Alpha
    • Beta Etc.
    Markdown-2.6.9/tests/misc/lists5.txt0000644000076500000240000000024713064117426020020 0ustar waylanstaff00000000000000> This is a test of a block quote > With just two lines A paragraph > This is a more difficult case > With a list item inside the quote > > * Alpha > * Beta > Etc. Markdown-2.6.9/tests/misc/lists6.html0000644000076500000240000000036313064117426020145 0ustar waylanstaff00000000000000

    Test five or more spaces as start of list:

    • five spaces

    not first item:

    • one space
    • five spaces

    loose list:

    • one space

    • five spaces

    Markdown-2.6.9/tests/misc/lists6.txt0000644000076500000240000000023313064117426020014 0ustar waylanstaff00000000000000Test five or more spaces as start of list: * five spaces not first item: * one space * five spaces loose list: * one space * five spaces Markdown-2.6.9/tests/misc/lists7.html0000644000076500000240000000174613064117426020154 0ustar waylanstaff00000000000000
    • item 1
      • item 2-1
      • item 2-2
      • item 2-3
      • item 2-4
    • item 3
      • item 4-1

      • item 4-2

      • item 4-3

      • item 4-4

    same as above, different spacing

    • item 1
      • item 2-1
      • item 2-2
    • item 3
      • item 4-1

      • item 4-2

    only 1 item in nested list ##

    • item 1
      • item 2-1
    • item 3
      • item 4-1

    Something ludicrous ##

    • item 1
      • item 2-1
      • item 2-2
        • item 2-2-1
        • item 2-2-2
      • item 2-3
    • item 3
      • item 4-1

        • item 4-1-1
        • item 4-1-2
      • item 4-2

    Markdown-2.6.9/tests/misc/lists7.txt0000644000076500000240000000102513064117426020015 0ustar waylanstaff00000000000000* item 1 * * item 2-1 * item 2-2 * item 2-3 * item 2-4 * item 3 * * item 4-1 * item 4-2 * item 4-3 * item 4-4 ## same as above, different spacing * item 1 * * item 2-1 * item 2-2 * item 3 * * item 4-1 * item 4-2 ## only 1 item in nested list ## * item 1 * * item 2-1 * item 3 * * item 4-1 ## Something ludicrous ## * item 1 * * item 2-1 * item 2-2 * * item 2-2-1 * item 2-2-2 * item 2-3 * item 3 * * item 4-1 * * item 4-1-1 * item 4-1-2 * item 4-2 Markdown-2.6.9/tests/misc/lists8.html0000644000076500000240000000106213064117426020144 0ustar waylanstaff00000000000000

    Lists with blockquotes

    1. Four-score and seven years ago...

    2. We have nothing to fear...

    3. This is it...

    Multi-line blockquotes

    • Four-score and sever years ago our fathers brought forth

    • We have nothing to fear but fear itself

    • This is it as far as I'm concerned

    Markdown-2.6.9/tests/misc/lists8.txt0000644000076500000240000000045513064117426020024 0ustar waylanstaff00000000000000# Lists with blockquotes 1. > Four-score and seven years ago... 2. > We have nothing to fear... 3. > This is it... # Multi-line blockquotes * > Four-score and sever years ago > our fathers brought forth * > We have nothing to fear > but fear itself * > This is it > as far as I'm concerned Markdown-2.6.9/tests/misc/markup-inside-p.html0000644000076500000240000000012013064117426021715 0ustar waylanstaff00000000000000

    _foo_

    _foo_

    _foo_

    _foo_

    _foo_

    Markdown-2.6.9/tests/misc/markup-inside-p.txt0000644000076500000240000000012113064117426021571 0ustar waylanstaff00000000000000

    _foo_

    _foo_

    _foo_

    _foo_

    _foo_

    Markdown-2.6.9/tests/misc/mismatched-tags.html0000644000076500000240000000037713064117426022000 0ustar waylanstaff00000000000000

    Some text

    some more text

    and a bit more

    And this output

    Compatible with PHP Markdown Extra 1.2.2 and Markdown.pl1.0.2b8:

    text


    Should be in p

    Markdown-2.6.9/tests/misc/mismatched-tags.txt0000644000076500000240000000033113064117426021641 0ustar waylanstaff00000000000000

    Some text

    some more text
    and a bit more

    And this output

    *Compatible with PHP Markdown Extra 1.2.2 and Markdown.pl1.0.2b8:*

    text


    Should be in p Markdown-2.6.9/tests/misc/missing-link-def.html0000644000076500000240000000015113064117426022054 0ustar waylanstaff00000000000000

    This is a [missing link][empty] and a valid and [missing][again].

    Markdown-2.6.9/tests/misc/missing-link-def.txt0000644000076500000240000000014713064117426021734 0ustar waylanstaff00000000000000This is a [missing link][empty] and a [valid][link] and [missing][again]. [link]: http://example.com Markdown-2.6.9/tests/misc/more_comments.html0000644000076500000240000000015513064117426021567 0ustar waylanstaff00000000000000

    Foo

    Bar

    foo

    foo

    foo

    foo
    This shouldn't

    <?php echo "not_block_level";?>

    Markdown-2.6.9/tests/misc/php.txt0000644000076500000240000000037613064117426017367 0ustar waylanstaff00000000000000 This should have a p tag
    This shouldn't
    Markdown-2.6.9/tests/misc/pre.html0000644000076500000240000000022113064117426017500 0ustar waylanstaff00000000000000
    
    aaa
    
    bbb
    
    * and this is pre-formatted content
    * and it should be printed just like this
    * and not formatted as a list
    
    
    Markdown-2.6.9/tests/misc/pre.txt0000644000076500000240000000022313064117426017355 0ustar waylanstaff00000000000000
    
    aaa
    
    bbb
    
    * and this is pre-formatted content
    * and it should be printed just like this
    * and not formatted as a list
    
    
    Markdown-2.6.9/tests/misc/raw_whitespace.html0000644000076500000240000000017313064117426021725 0ustar waylanstaff00000000000000

    Preserve whitespace in raw html

    class Foo():
        bar = 'bar'
    
        def baz(self):
            print self.bar
    
    Markdown-2.6.9/tests/misc/raw_whitespace.txt0000644000076500000240000000016713064117426021603 0ustar waylanstaff00000000000000Preserve whitespace in raw html
    class Foo():
        bar = 'bar'
    
        def baz(self):
            print self.bar
    
    Markdown-2.6.9/tests/misc/russian.html0000644000076500000240000000643313064117426020411 0ustar waylanstaff00000000000000

    Ðедвард «Ðед» ФландерÑ

    Ðедвард «Ðед» Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ (Nedward «Ned» Flanders) — вымышленный перÑонаж мультÑериала «[СимпÑоны][]», озвученный Гарри Ширером. Он и его ÑÐµÐ¼ÑŒÑ Ð¶Ð¸Ð²ÑƒÑ‚ по ÑоÑедÑтву от Ñемьи СимпÑонов. Ðабожный хриÑтианин, Ðед ÑвлÑетÑÑ Ð¾Ð´Ð½Ð¸Ð¼ из Ñтолпов морали Спрингфилда. Ð’ Ñпизоде «Alone Again, Natura-Diddily» он овдовел, его жена Мод погибла в результате неÑчаÑтного ÑлучаÑ.

    Ðед был одним из первых перÑонажей в мультÑериале, который не был членом Ñемьи СимпÑонов. ÐÐ°Ñ‡Ð¸Ð½Ð°Ñ Ñ Ð¿ÐµÑ€Ð²Ñ‹Ñ… Ñерий, он регулÑрно поÑвлÑетÑÑ Ð² «СимпÑонах». СчитаетÑÑ, что Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ð±Ñ‹Ð» назван в чеÑть улицы Northeast Flanders St. в Портленде, Орегон, родном городе ÑÐ¾Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ Ð¼ÑƒÐ»ÑŒÑ‚Ñериала МÑтта Грейнинга]]. ÐадпиÑÑŒ на указателе улицы NE Flanders St. хулиганы чаÑто иÑправлÑли на NED Flanders St.

    БиографиÑ

    Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ñ€Ð¾Ð´Ð¸Ð»ÑÑ Ð² Ðью-Йорке, его родители были битниками. Его отец в точноÑти похож на взроÑлого Ðеда, только он ноÑил козлиную бородку. Их отказ от воÑÐ¿Ð¸Ñ‚Ð°Ð½Ð¸Ñ Ðеда и то, что они, в общем-то, были плохими родителÑми («мы ничего в Ñтом не понимаем и не знаем как начать») привело к тому, что Ðед превратилÑÑ Ð² ужаÑного Ñорванца. Ð’ конце концов они ÑоглаÑилиÑÑŒ на ÑкÑпериментальную воÑьмимеÑÑчную шлепологичеÑкую терапию МиннеÑотÑкого УниверÑитета (воÑÐ¿Ð¾Ð¼Ð¸Ð½Ð°Ð½Ð¸Ñ Ðеда в Ñпизоде «Hurricane Neddy»), ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ð°ÑƒÑ‡Ð¸Ð»Ð° его подавлÑть чувÑтво злоÑти. Побочным Ñфектом терапии Ñтало то, что Ðед Ñтал ненавидеть Ñвоих родителей (Ñто одна из двух вещей которые ненавидит ФландерÑ, Ð²Ñ‚Ð¾Ñ€Ð°Ñ â€” Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹, чьи длинные очереди, Ñуета и угрюмый перÑонал раздражают его).

    У Ðеда еÑть ÑÑ‚Ñ€Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñ‹Ñ‡ÐºÐ° добавлÑть «дидли», «дадли» и другие беÑÑмыÑленные Ñлова в Ñвои фразы при разговоре, например: «Hi-diddly-ho, neighbor-ino» («Приветик, ÑоÑедушка»). Это результат Ñублимации его злоÑти, вызванной Ñдерживанием гнева, который не имеет никакого другого выхода.

    Markdown-2.6.9/tests/misc/russian.txt0000644000076500000240000000634313064117426020264 0ustar waylanstaff00000000000000Ðедвард «Ðед» Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ ====================== **Ðедвард «Ðед» ФландерÑ** (Nedward «Ned» Flanders) — вымышленный перÑонаж мультÑериала «[СимпÑоны][]», озвученный Гарри Ширером. Он и его ÑÐµÐ¼ÑŒÑ Ð¶Ð¸Ð²ÑƒÑ‚ по ÑоÑедÑтву от Ñемьи СимпÑонов. Ðабожный хриÑтианин, Ðед ÑвлÑетÑÑ Ð¾Ð´Ð½Ð¸Ð¼ из Ñтолпов морали Спрингфилда. Ð’ Ñпизоде «Alone Again, Natura-Diddily» он овдовел, его жена Мод погибла в результате неÑчаÑтного ÑлучаÑ. Ðед был одним из первых перÑонажей в мультÑериале, который не был членом Ñемьи СимпÑонов. ÐÐ°Ñ‡Ð¸Ð½Ð°Ñ Ñ Ð¿ÐµÑ€Ð²Ñ‹Ñ… Ñерий, он регулÑрно поÑвлÑетÑÑ Ð² «СимпÑонах». СчитаетÑÑ, что Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ð±Ñ‹Ð» назван в чеÑть улицы *Northeast Flanders St.* в [Портленде](http://www.portland.gov), Орегон, родном городе ÑÐ¾Ð·Ð´Ð°Ñ‚ÐµÐ»Ñ Ð¼ÑƒÐ»ÑŒÑ‚Ñериала МÑтта Грейнинга]]. ÐадпиÑÑŒ на указателе улицы *NE Flanders St.* хулиганы чаÑто иÑправлÑли на _NED Flanders St._ ## Ð‘Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ Ðед Ð¤Ð»Ð°Ð½Ð´ÐµÑ€Ñ Ñ€Ð¾Ð´Ð¸Ð»ÑÑ Ð² Ðью-Йорке, его родители были битниками. Его отец в точноÑти похож на взроÑлого Ðеда, только он ноÑил козлиную бородку. Их отказ от воÑÐ¿Ð¸Ñ‚Ð°Ð½Ð¸Ñ Ðеда и то, что они, в общем-то, были плохими родителÑми («мы ничего в Ñтом не понимаем и не знаем как начать») привело к тому, что Ðед превратилÑÑ Ð² ужаÑного Ñорванца. Ð’ конце концов они ÑоглаÑилиÑÑŒ на ÑкÑпериментальную воÑьмимеÑÑчную шлепологичеÑкую терапию МиннеÑотÑкого УниверÑитета (воÑÐ¿Ð¾Ð¼Ð¸Ð½Ð°Ð½Ð¸Ñ Ðеда в Ñпизоде «Hurricane Neddy»), ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ð°ÑƒÑ‡Ð¸Ð»Ð° его подавлÑть чувÑтво злоÑти. Побочным Ñфектом терапии Ñтало то, что Ðед Ñтал ненавидеть Ñвоих родителей (Ñто одна из двух вещей которые ненавидит ФландерÑ, Ð²Ñ‚Ð¾Ñ€Ð°Ñ â€” Ð¾Ñ‚Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ñ‡Ñ‚Ñ‹, чьи длинные очереди, Ñуета и угрюмый перÑонал раздражают его). У Ðеда еÑть ÑÑ‚Ñ€Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñ‹Ñ‡ÐºÐ° добавлÑть «дидли», «дадли» и другие беÑÑмыÑленные Ñлова в Ñвои фразы при разговоре, например: «Hi-diddly-ho, neighbor-ino» («Приветик, ÑоÑедушка»). Это результат Ñублимации его злоÑти, вызванной Ñдерживанием гнева, который не имеет никакого другого выхода. Markdown-2.6.9/tests/misc/smart_em.html0000644000076500000240000000026213064117426020526 0ustar waylanstaff00000000000000

    emphasis

    this_is_not_emphasis

    [punctuation with emphasis]

    [punctuation_with_emphasis]

    [punctuation_without_emphasis]

    Markdown-2.6.9/tests/misc/smart_em.txt0000644000076500000240000000017713064117426020406 0ustar waylanstaff00000000000000_emphasis_ this_is_not_emphasis [_punctuation with emphasis_] [_punctuation_with_emphasis_] [punctuation_without_emphasis] Markdown-2.6.9/tests/misc/some-test.html0000644000076500000240000000132613064117426020641 0ustar waylanstaff00000000000000
    • as if

    • as if2


    • as if

    • as if2


    • as if non_code
    • as if2

    Markdown

    • Python is ok

      • Therefore i am
    • Perl sucks big time

      • But that's ok
    • Python is ok Or not?

    Here is a normal paragraph

    1. Another list with a bunch of items
    2. Mostly fruits

      1. Apple
      2. Pare

    asdfasdfasd

    # This is a code example
    import stuff
    
    Another code example
    * Lists and similar stuff
    
    > Should be ignored
    
    Markdown-2.6.9/tests/misc/some-test.txt0000644000076500000240000000103113064117426020505 0ustar waylanstaff00000000000000---------------------- * as if * as if2 ---------------------- * as if * as if2 ---------------------- * as if non_code * as if2 Markdown * Python is ok * Therefore i am * Perl sucks big time * But that's ok * Python is ok Or not? Here is a normal paragraph 1. Another list with a bunch of items 2. Mostly fruits 3. Apple 4. Pare asdfasdfasd # This is a code example import stuff Another code example * Lists and similar stuff > Should be ignored Markdown-2.6.9/tests/misc/span.html0000644000076500000240000000025613064117426017663 0ustar waylanstaff00000000000000

    Foo bar Baz

    *foo*
    Foo *bar* Baz

    Foo bar Baz

    Markdown-2.6.9/tests/misc/span.txt0000644000076500000240000000022713064117426017534 0ustar waylanstaff00000000000000 Foo *bar* Baz
    *foo*
    Foo *bar* Baz
    Foo *bar* Baz Markdown-2.6.9/tests/misc/strong-with-underscores.html0000644000076500000240000000004613064117426023536 0ustar waylanstaff00000000000000

    this_is_strong

    Markdown-2.6.9/tests/misc/strong-with-underscores.txt0000644000076500000240000000002313064117426023404 0ustar waylanstaff00000000000000__this_is_strong__ Markdown-2.6.9/tests/misc/stronintags.html0000644000076500000240000000034613064117426021275 0ustar waylanstaff00000000000000

    this is a test

    this is a second test

    reference [test][] reference [test][]

    Markdown-2.6.9/tests/misc/stronintags.txt0000644000076500000240000000021413064117426021142 0ustar waylanstaff00000000000000this is a [**test**](http://example.com/) this is a second **[test](http://example.com)** reference **[test][]** reference [**test**][] Markdown-2.6.9/tests/misc/tabs-in-lists.html0000644000076500000240000000066213064117426021414 0ustar waylanstaff00000000000000

    First a list with a tabbed line

    • A

    • B

    Just a blank line:

    • A

    • B

    Now a list with 4 spaces and some text:

    • A abcdef
    • B

    Now with a tab and an extra space:

    • A

    • B

    Now a list with 4 spaces:

    • A

    • B

    Markdown-2.6.9/tests/misc/tabs-in-lists.txt0000644000076500000240000000034213064117426021262 0ustar waylanstaff00000000000000First a list with a tabbed line * A * B Just a blank line: * A * B Now a list with 4 spaces and some text: * A abcdef * B Now with a tab and an extra space: * A * B Now a list with 4 spaces: * A * B Markdown-2.6.9/tests/misc/two-spaces.html0000644000076500000240000000064413064117426021010 0ustar waylanstaff00000000000000

    This line has two spaces at the end
    but this one has none but this line has three
    and this is the second from last line in this test message

    • This list item has two spaces.
    • This has none. This line has three.
      This line has none. And this line two.

      This line has none.

    • This line has none.

    And this is the end.

    Markdown-2.6.9/tests/misc/two-spaces.txt0000644000076500000240000000053213064117426020657 0ustar waylanstaff00000000000000This line has two spaces at the end but this one has none but this line has three and this is the second from last line in this test message * This list item has two spaces. * This has none. This line has three. This line has none. And this line two. This line has none. * This line has none. And this is the end. Markdown-2.6.9/tests/misc/uche.html0000644000076500000240000000052713064117426017647 0ustar waylanstaff00000000000000

    asif

    text

    Markdown-2.6.9/tests/misc/uche.txt0000644000076500000240000000036313064117426017520 0ustar waylanstaff00000000000000![asif](http://fourthought.com/images/ftlogo.png "Fourthought logo") [![{@style=float: left; margin: 10px; border: none;}](http://fourthought.com/images/ftlogo.png "Fourthought logo")](http://fourthought.com/) [![text](x)](http://link.com/) Markdown-2.6.9/tests/misc/underscores.html0000644000076500000240000000040213064117426021247 0ustar waylanstaff00000000000000

    THIS_SHOULD_STAY_AS_IS

    Here is some emphasis, ok?

    Ok, at least this should work.

    THISSHOULDSTAY

    Here is some strong stuff.

    THISSHOULDSTAY?

    Markdown-2.6.9/tests/misc/underscores.txt0000644000076500000240000000024213064117426021124 0ustar waylanstaff00000000000000THIS_SHOULD_STAY_AS_IS Here is some _emphasis_, ok? Ok, at least _this_ should work. THIS__SHOULD__STAY Here is some __strong__ stuff. THIS___SHOULD___STAY? Markdown-2.6.9/tests/misc/url_spaces.html0000644000076500000240000000024113064117426021054 0ustar waylanstaff00000000000000

    Dawn of War

    Dawn of War

    Markdown-2.6.9/tests/misc/url_spaces.txt0000644000076500000240000000017213064117426020732 0ustar waylanstaff00000000000000[Dawn of War](http://wikipedia.org/wiki/Dawn of War) [Dawn of War](http://wikipedia.org/wiki/Dawn of War "Dawn of War") Markdown-2.6.9/tests/options/0000755000076500000240000000000013145427672016600 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/options/html4.html0000644000076500000240000000007613064117426020512 0ustar waylanstaff00000000000000

    A test of the most
    basic of html/xhtml differences.

    Markdown-2.6.9/tests/options/html4.txt0000644000076500000240000000006513064117426020363 0ustar waylanstaff00000000000000A test of the most basic of html/xhtml differences.Markdown-2.6.9/tests/options/lazy_ol_off.html0000644000076500000240000000042413064117426021762 0ustar waylanstaff00000000000000

    A numbered list from daringfireball:

    1. Bird
    2. McHale
    3. Parish

    Again:

    1. Bird
    2. McHale
    3. Parish

    Now starting with 1:

    1. Bird
    2. McHale
    3. Parish
    Markdown-2.6.9/tests/options/lazy_ol_off.txt0000644000076500000240000000023213064117426021632 0ustar waylanstaff00000000000000A numbered list from daringfireball: 3. Bird 1. McHale 8. Parish Again: 3. Bird 1. McHale 8. Parish Now starting with 1: 1. Bird 1. McHale 8. Parish Markdown-2.6.9/tests/options/no-attributes.html0000644000076500000240000000022213064117426022253 0ustar waylanstaff00000000000000

    Regression test for issue 87

    It's run with enable_attributes=False so this {@id=explanation} should not become an attribute

    Markdown-2.6.9/tests/options/no-attributes.txt0000644000076500000240000000017713064117426022137 0ustar waylanstaff00000000000000Regression *test* for issue 87 It's run with enable_attributes=False so this {@id=explanation} should not become an attribute Markdown-2.6.9/tests/options/no-smart-emphasis.html0000644000076500000240000000003713064117426023026 0ustar waylanstaff00000000000000

    connectedwords_

    Markdown-2.6.9/tests/options/no-smart-emphasis.txt0000644000076500000240000000002113064117426022672 0ustar waylanstaff00000000000000_connected_words_Markdown-2.6.9/tests/options/test.cfg0000644000076500000240000000023313064117426020227 0ustar waylanstaff00000000000000lazy_ol_off: lazy_ol: False html4: output_format: html4 no-attributes: enable_attributes: False no-smart-emphasis: smart_emphasis: FalseMarkdown-2.6.9/tests/php/0000755000076500000240000000000013145427672015674 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/php/extra/0000755000076500000240000000000013145427672017017 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/php/extra/test.cfg0000644000076500000240000000017013064117426020446 0ustar waylanstaff00000000000000DEFAULT: extensions: - extra normalize: True input_ext: .text output_ext: .xhtml skip: True Markdown-2.6.9/tests/php/test.cfg0000644000076500000240000000226113064117426017326 0ustar waylanstaff00000000000000DEFAULT: normalize: True input_ext: .text output_ext: .xhtml #skip: True Quotes in attributes: # attributes get output in differant order skip: True Inline HTML (Span): # Backtick in raw HTML attribute TODO: fixme skip: True Backslash escapes: # Weird whitespace issue in output skip: True Ins & del: # Our behavior follows markdown.pl I think PHP is wrong here skip: True Auto Links: # TODO: fix raw HTML so is doesn't match as a
    . skip: True Empty List Item: # We match markdown.pl here. Maybe someday we'll support this skip: True Headers: # TODO: fix headers to not require blank line before skip: True Mixed OLs and ULs: # We match markdown.pl here. I think PHP is wrong here skip: True Emphasis: # We have various minor differances in combined & incorrect em markup. # Maybe fix a few of them - but most aren't too important skip: True Code block in a list item: # We match markdown.pl - not sure how php gets that output?? skip: True PHP-Specific Bugs: # Not sure what to make of the escaping stuff here. Why is PHP not removing a blackslash? skip: True Markdown-2.6.9/tests/pl/0000755000076500000240000000000013145427671015517 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/pl/Tests_2004/0000755000076500000240000000000013145427672017267 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/pl/Tests_2004/Amps and angle encoding.html0000644000076500000240000000077113064117426024414 0ustar waylanstaff00000000000000

    AT&T has an ampersand in their name.

    AT&T is another way to write it.

    This & that.

    4 < 5.

    6 > 5.

    Here's a link with an ampersand in the URL.

    Here's a link with an amersand in the link text: AT&T.

    Here's an inline link.

    Here's an inline link.

    Markdown-2.6.9/tests/pl/Tests_2004/Auto links.html0000644000076500000240000000104213064117426022154 0ustar waylanstaff00000000000000

    Link: http://example.com/.

    With an ampersand: http://example.com/?foo=1&bar=2

    Blockquoted: http://example.com/

    Auto-links should not occur here: <http://example.com/>

    or here: <http://example.com/>
    
    Markdown-2.6.9/tests/pl/Tests_2004/Backslash escapes.html0000644000076500000240000000242613064117426023451 0ustar waylanstaff00000000000000

    These should all get escaped:

    Backslash: \

    Backtick: `

    Asterisk: *

    Underscore: _

    Left brace: {

    Right brace: }

    Left bracket: [

    Right bracket: ]

    Left paren: (

    Right paren: )

    Greater-than: >

    Hash: #

    Period: .

    Bang: !

    Plus: +

    Minus: -

    These should not, because they occur within a code block:

    Backslash: \\
    
    Backtick: \`
    
    Asterisk: \*
    
    Underscore: \_
    
    Left brace: \{
    
    Right brace: \}
    
    Left bracket: \[
    
    Right bracket: \]
    
    Left paren: \(
    
    Right paren: \)
    
    Greater-than: \>
    
    Hash: \#
    
    Period: \.
    
    Bang: \!
    
    Plus: \+
    
    Minus: \-
    

    Nor should these, which occur in code spans:

    Backslash: \\

    Backtick: \`

    Asterisk: \*

    Underscore: \_

    Left brace: \{

    Right brace: \}

    Left bracket: \[

    Right bracket: \]

    Left paren: \(

    Right paren: \)

    Greater-than: \>

    Hash: \#

    Period: \.

    Bang: \!

    Plus: \+

    Minus: \-

    Markdown-2.6.9/tests/pl/Tests_2004/Blockquotes with code blocks.html0000644000076500000240000000027213064117426025527 0ustar waylanstaff00000000000000

    Example:

    sub status {
        print "working";
    }
    

    Or:

    sub status {
        return "working";
    }
    
    Markdown-2.6.9/tests/pl/Tests_2004/Hard-wrapped paragraphs with list-like lines.html0000644000076500000240000000032313064117426030500 0ustar waylanstaff00000000000000

    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

    Here's one with a bullet. * criminey.

    Markdown-2.6.9/tests/pl/Tests_2004/Horizontal rules.html0000644000076500000240000000066113064117426023415 0ustar waylanstaff00000000000000

    Dashes:





    ---
    




    - - -
    

    Asterisks:





    ***
    




    * * *
    

    Underscores:





    ___
    




    _ _ _
    
    Markdown-2.6.9/tests/pl/Tests_2004/Inline HTML (Advanced).html0000644000076500000240000000022413064117426023716 0ustar waylanstaff00000000000000

    Simple block on one line:

    foo

    And nested without indentation:

    foo
    bar
    Markdown-2.6.9/tests/pl/Tests_2004/Inline HTML (Simple).html0000644000076500000240000000142013064117426023441 0ustar waylanstaff00000000000000

    Here's a simple block:

    foo

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    foo

    This should just be an HTML comment:

    Multiline:

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    Code:

    <hr />
    

    Hr's:










    Markdown-2.6.9/tests/pl/Tests_2004/Inline HTML comments.html0000644000076500000240000000027413064117426023722 0ustar waylanstaff00000000000000

    Paragraph one.

    Paragraph two.

    The end.

    Markdown-2.6.9/tests/pl/Tests_2004/Links, inline style.html0000644000076500000240000000043113064117426023660 0ustar waylanstaff00000000000000

    Just a URL.

    URL and title.

    URL and title.

    URL and title.

    Empty.

    Markdown-2.6.9/tests/pl/Tests_2004/Links, reference style.html0000644000076500000240000000062713064117426024347 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Foo bar.

    With embedded [brackets].

    Indented once.

    Indented twice.

    Indented thrice.

    Indented [four][] times.

    [four]: /url
    
    Markdown-2.6.9/tests/pl/Tests_2004/Literal quotes in titles.html0000644000076500000240000000024313064117426024716 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Markdown-2.6.9/tests/pl/Tests_2004/Markdown Documentation - Basics.html0000644000076500000240000002225013064117426026025 0ustar waylanstaff00000000000000

    Markdown: Basics

    Getting the Gist of Markdown's Formatting Syntax

    This page offers a brief overview of what it's like to use Markdown. The syntax page provides complete, detailed documentation for every feature, but Markdown should be very easy to pick up simply by looking at a few examples of it in action. The examples on this page are written in a before/after style, showing example syntax and the HTML output produced by Markdown.

    It's also helpful to simply try Markdown out; the Dingus is a web application that allows you type your own Markdown-formatted text and translate it to XHTML.

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.

    Paragraphs, Headers, Blockquotes

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    Markdown offers two styles of headers: Setext and atx. Setext-style headers for <h1> and <h2> are created by "underlining" with equal signs (=) and hyphens (-), respectively. To create an atx-style header, you put 1-6 hash marks (#) at the beginning of the line -- the number of hashes equals the resulting HTML header level.

    Blockquotes are indicated using email-style '>' angle brackets.

    Markdown:

    A First Level Header
    ====================
    
    A Second Level Header
    ---------------------
    
    Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.
    
    The quick brown fox jumped over the lazy
    dog's back.
    
    ### Header 3
    
    > This is a blockquote.
    > 
    > This is the second paragraph in the blockquote.
    >
    > ## This is an H2 in a blockquote
    

    Output:

    <h1>A First Level Header</h1>
    
    <h2>A Second Level Header</h2>
    
    <p>Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.</p>
    
    <p>The quick brown fox jumped over the lazy
    dog's back.</p>
    
    <h3>Header 3</h3>
    
    <blockquote>
        <p>This is a blockquote.</p>
    
        <p>This is the second paragraph in the blockquote.</p>
    
        <h2>This is an H2 in a blockquote</h2>
    </blockquote>
    

    Phrase Emphasis

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    Markdown:

    Some of these words *are emphasized*.
    Some of these words _are emphasized also_.
    
    Use two asterisks for **strong emphasis**.
    Or, if you prefer, __use two underscores instead__.
    

    Output:

    <p>Some of these words <em>are emphasized</em>.
    Some of these words <em>are emphasized also</em>.</p>
    
    <p>Use two asterisks for <strong>strong emphasis</strong>.
    Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    

    Lists

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, +, and -) as list markers. These three markers are interchangable; this:

    *   Candy.
    *   Gum.
    *   Booze.
    

    this:

    +   Candy.
    +   Gum.
    +   Booze.
    

    and this:

    -   Candy.
    -   Gum.
    -   Booze.
    

    all produce the same output:

    <ul>
    <li>Candy.</li>
    <li>Gum.</li>
    <li>Booze.</li>
    </ul>
    

    Ordered (numbered) lists use regular numbers, followed by periods, as list markers:

    1.  Red
    2.  Green
    3.  Blue
    

    Output:

    <ol>
    <li>Red</li>
    <li>Green</li>
    <li>Blue</li>
    </ol>
    

    If you put blank lines between items, you'll get <p> tags for the list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab:

    *   A list item.
    
        With multiple paragraphs.
    
    *   Another item in the list.
    

    Output:

    <ul>
    <li><p>A list item.</p>
    <p>With multiple paragraphs.</p></li>
    <li><p>Another item in the list.</p></li>
    </ul>
    

    Links

    Markdown supports two styles for creating links: inline and reference. With both styles, you use square brackets to delimit the text you want to turn into a link.

    Inline-style links use parentheses immediately after the link text. For example:

    This is an [example link](http://example.com/).
    

    Output:

    <p>This is an <a href="http://example.com/">
    example link</a>.</p>
    

    Optionally, you may include a title attribute in the parentheses:

    This is an [example link](http://example.com/ "With a Title").
    

    Output:

    <p>This is an <a href="http://example.com/" title="With a Title">
    example link</a>.</p>
    

    Reference-style links allow you to refer to your links by names, which you define elsewhere in your document:

    I get 10 times more traffic from [Google][1] than from
    [Yahoo][2] or [MSN][3].
    
    [1]: http://google.com/        "Google"
    [2]: http://search.yahoo.com/  "Yahoo Search"
    [3]: http://search.msn.com/    "MSN Search"
    

    Output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    title="MSN Search">MSN</a>.</p>
    

    The title attribute is optional. Link names may contain letters, numbers and spaces, but are not case sensitive:

    I start my morning with a cup of coffee and
    [The New York Times][NY Times].
    
    [ny times]: http://www.nytimes.com/
    

    Output:

    <p>I start my morning with a cup of coffee and
    <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    

    Images

    Image syntax is very much like link syntax.

    Inline (titles are optional):

    ![alt text](/path/to/img.jpg "Title")
    

    Reference-style:

    ![alt text][id]
    
    [id]: /path/to/img.jpg "Title"
    

    Both of the above examples produce the same output:

    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    

    Code

    In a regular paragraph, you can create code span by wrapping text in backtick quotes. Any ampersands (&) and angle brackets (< or >) will automatically be translated into HTML entities. This makes it easy to use Markdown to write about HTML example code:

    I strongly recommend against using any `<blink>` tags.
    
    I wish SmartyPants used named entities like `&mdash;`
    instead of decimal-encoded entites like `&#8212;`.
    

    Output:

    <p>I strongly recommend against using any
    <code>&lt;blink&gt;</code> tags.</p>
    
    <p>I wish SmartyPants used named entities like
    <code>&amp;mdash;</code> instead of decimal-encoded
    entites like <code>&amp;#8212;</code>.</p>
    

    To specify an entire block of pre-formatted code, indent every line of the block by 4 spaces or 1 tab. Just like with code spans, &, <, and > characters will be escaped automatically.

    Markdown:

    If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:
    
        <blockquote>
            <p>For example.</p>
        </blockquote>
    

    Output:

    <p>If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:</p>
    
    <pre><code>&lt;blockquote&gt;
        &lt;p&gt;For example.&lt;/p&gt;
    &lt;/blockquote&gt;
    </code></pre>
    
    Markdown-2.6.9/tests/pl/Tests_2004/Markdown Documentation - Syntax.html0000644000076500000240000007605113064117426026117 0ustar waylanstaff00000000000000

    Markdown: Syntax

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

    Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

    To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    For example, to add an HTML table to a Markdown article:

    This is a regular paragraph.
    
    <table>
        <tr>
            <td>Foo</td>
        </tr>
    </table>
    
    This is another regular paragraph.
    

    Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

    Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.

    Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

    Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

    http://images.google.com/images?num=30&q=larry+bird
    

    you need to encode the URL as:

    http://images.google.com/images?num=30&amp;q=larry+bird
    

    in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

    Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

    So, if you want to include a copyright symbol in your article, you can write:

    &copy;
    

    and Markdown will leave it alone. But if you write:

    AT&T
    

    Markdown will translate it to:

    AT&amp;T
    

    Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

    4 < 5
    

    Markdown will translate it to:

    4 &lt; 5
    

    However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)


    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    Markdown supports two styles of headers, Setext and atx.

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    =============
    
    This is an H2
    -------------
    

    Any number of underlining ='s or -'s will work.

    Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:

    # This is an H1
    
    ## This is an H2
    
    ###### This is an H6
    

    Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :

    # This is an H1 #
    
    ## This is an H2 ##
    
    ### This is an H3 ######
    

    Blockquotes

    Markdown uses email-style > characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    > 
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    > id sem consectetuer libero luctus adipiscing.
    

    Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    id sem consectetuer libero luctus adipiscing.
    

    Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

    > This is the first level of quoting.
    >
    > > This is nested blockquote.
    >
    > Back to the first level.
    

    Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

    > ## This is a header.
    > 
    > 1.   This is the first list item.
    > 2.   This is the second list item.
    > 
    > Here's some example code:
    > 
    >     return shell_exec("echo $input | $markdown_script");
    

    Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists.

    Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:

    *   Red
    *   Green
    *   Blue
    

    is equivalent to:

    +   Red
    +   Green
    +   Blue
    

    and:

    -   Red
    -   Green
    -   Blue
    

    Ordered lists use numbers followed by periods:

    1.  Bird
    2.  McHale
    3.  Parish
    

    It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
    

    If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
    

    or even:

    3. Bird
    1. McHale
    8. Parish
    

    you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to.

    If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

    List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

    To make lists look nice, you can wrap items with hanging indents:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
        Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
        viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
        Suspendisse id sem consectetuer libero luctus adipiscing.
    

    But if you want to be lazy, you don't have to:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
    

    If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output. For example, this input:

    *   Bird
    *   Magic
    

    will turn into:

    <ul>
    <li>Bird</li>
    <li>Magic</li>
    </ul>
    

    But this:

    *   Bird
    
    *   Magic
    

    will turn into:

    <ul>
    <li><p>Bird</p></li>
    <li><p>Magic</p></li>
    </ul>
    

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:

    1.  This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus adipiscing.
    

    It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:

    *   This is a list item with two paragraphs.
    
        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.
    
    *   Another item in the same list.
    

    To put a blockquote within a list item, the blockquote's > delimiters need to be indented:

    *   A list item with a blockquote:
    
        > This is a blockquote
        > inside a list item.
    

    To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:

    *   A list item with a code block:
    
            <code goes here>
    

    It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:

    1986. What a great season.
    

    In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:

    1986\. What a great season.
    

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>
    

    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:

    Here is an example of AppleScript:
    
        tell application "Foo"
            beep
        end tell
    

    will turn into:

    <p>Here is an example of AppleScript:</p>
    
    <pre><code>tell application "Foo"
        beep
    end tell
    </code></pre>
    

    A code block continues until it reaches a line that is not indented (or the end of the article).

    Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

        <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
    

    will turn into:

    <pre><code>&lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
    </code></pre>
    

    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

    * * *
    
    ***
    
    *****
    
    - - -
    
    ---------------------------------------
    
    _ _ _
    

    Span Elements

    Markdown supports two style of links: inline and reference.

    In both styles, the link text is delimited by [square brackets].

    To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

    This is [an example](http://example.com/ "Title") inline link.
    
    [This link](http://example.net/) has no title attribute.
    

    Will produce:

    <p>This is <a href="http://example.com/" title="Title">
    an example</a> inline link.</p>
    
    <p><a href="http://example.net/">This link</a> has no
    title attribute.</p>
    

    If you're referring to a local resource on the same server, you can use relative paths:

    See my [About](/about/) page for details.
    

    Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

    This is [an example][id] reference-style link.
    

    You can optionally use a space to separate the sets of brackets:

    This is [an example] [id] reference-style link.
    

    Then, anywhere in the document, you define your link label like this, on a line by itself:

    [id]: http://example.com/  "Optional Title Here"
    

    That is:

    • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
    • followed by a colon;
    • followed by one or more spaces (or tabs);
    • followed by the URL for the link;
    • optionally followed by a title attribute for the link, enclosed in double or single quotes.

    The link URL may, optionally, be surrounded by angle brackets:

    [id]: <http://example.com/>  "Optional Title Here"
    

    You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"
    

    Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

    Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

    [link text][a]
    [link text][A]
    

    are equivalent.

    The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

    [Google][]
    

    And then define the link:

    [Google]: http://google.com/
    

    Because link names may contain spaces, this shortcut even works for multiple words in the link text:

    Visit [Daring Fireball][] for more information.
    

    And then define the link:

    [Daring Fireball]: http://daringfireball.net/
    

    Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

    Here's an example of reference links in action:

    I get 10 times more traffic from [Google] [1] than from
    [Yahoo] [2] or [MSN] [3].
    
      [1]: http://google.com/        "Google"
      [2]: http://search.yahoo.com/  "Yahoo Search"
      [3]: http://search.msn.com/    "MSN Search"
    

    Using the implicit link name shortcut, you could instead write:

    I get 10 times more traffic from [Google][] than from
    [Yahoo][] or [MSN][].
    
      [google]: http://google.com/        "Google"
      [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
      [msn]:    http://search.msn.com/    "MSN Search"
    

    Both of the above examples will produce the following HTML output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from
    <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
    or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
    

    For comparison, here is the same paragraph written using Markdown's inline link style:

    I get 10 times more traffic from [Google](http://google.com/ "Google")
    than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
    [MSN](http://search.msn.com/ "MSN Search").
    

    The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

    With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

    *single asterisks*
    
    _single underscores_
    
    **double asterisks**
    
    __double underscores__
    

    will produce:

    <em>single asterisks</em>
    
    <em>single underscores</em>
    
    <strong>double asterisks</strong>
    
    <strong>double underscores</strong>
    

    You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

    Emphasis can be used in the middle of a word:

    un*fucking*believable
    

    But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

    To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

    \*this text is surrounded by literal asterisks\*
    

    Code

    To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    

    will produce:

    <p>Use the <code>printf()</code> function.</p>
    

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal backtick (`) here.``
    

    which will produce this:

    <p><code>There is a literal backtick (`) here.</code></p>
    

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    
    A backtick-delimited string in a code span: `` `foo` ``
    

    will produce:

    <p>A single backtick in a code span: <code>`</code></p>
    
    <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
    

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

    Please don't use any `<blink>` tags.
    

    into:

    <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
    

    You can write this:

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
    

    to produce:

    <p><code>&amp;#8212;</code> is the decimal-encoded
    equivalent of <code>&amp;mdash;</code>.</p>
    

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

    Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
    

    That is:

    • An exclamation mark: !;
    • followed by a set of square brackets, containing the alt attribute text for the image;
    • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    

    Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

    [id]: url/to/image  "Optional title attribute"
    

    As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

    <http://example.com/>
    

    Markdown will turn this into:

    <a href="http://example.com/">http://example.com/</a>
    

    Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

    <address@example.com>
    

    into something like this:

    <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
    &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
    &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
    &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
    

    which will render in a browser as a clickable link to "address@example.com".

    (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can backslashes before the asterisks, like this:

    \*literal asterisks\*
    

    Markdown provides backslash escapes for the following characters:

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark
    
    Markdown-2.6.9/tests/pl/Tests_2004/Nested blockquotes.html0000644000076500000240000000015113064117426023701 0ustar waylanstaff00000000000000

    foo

    bar

    foo

    Markdown-2.6.9/tests/pl/Tests_2004/Ordered and unordered lists.html0000644000076500000240000000306213064117426025345 0ustar waylanstaff00000000000000

    Unordered

    Asterisks tight:

    • asterisk 1
    • asterisk 2
    • asterisk 3

    Asterisks loose:

    • asterisk 1

    • asterisk 2

    • asterisk 3


    Pluses tight:

    • Plus 1
    • Plus 2
    • Plus 3

    Pluses loose:

    • Plus 1

    • Plus 2

    • Plus 3


    Minuses tight:

    • Minus 1
    • Minus 2
    • Minus 3

    Minuses loose:

    • Minus 1

    • Minus 2

    • Minus 3

    Ordered

    Tight:

    1. First
    2. Second
    3. Third

    and:

    1. One
    2. Two
    3. Three

    Loose using tabs:

    1. First

    2. Second

    3. Third

    and using spaces:

    1. One

    2. Two

    3. Three

    Multiple paragraphs:

    1. Item 1, graf one.

      Item 2. graf two. The quick brown fox jumped over the lazy dog's back.

    2. Item 2.

    3. Item 3.

    Nested

    • Tab
      • Tab
        • Tab

    Here's another:

    1. First
    2. Second:
      • Fee
      • Fie
      • Foe
    3. Third

    Same thing but with paragraphs:

    1. First

    2. Second:

      • Fee
      • Fie
      • Foe
    3. Third

    Markdown-2.6.9/tests/pl/Tests_2004/Strong and em together.html0000644000076500000240000000032713064117426024333 0ustar waylanstaff00000000000000

    This is strong and em.

    So is this word.

    This is strong and em.

    So is this word.

    Markdown-2.6.9/tests/pl/Tests_2004/Tabs.html0000644000076500000240000000066713064117426021050 0ustar waylanstaff00000000000000
    • this is a list item indented with tabs

    • this is a list item indented with spaces

    Code:

    this code block is indented by one tab
    

    And:

        this code block is indented by two tabs
    

    And:

    +   this is an example list item
        indented with tabs
    
    +   this is an example list item
        indented with spaces
    
    Markdown-2.6.9/tests/pl/Tests_2004/test.cfg0000644000076500000240000000025413064117426020721 0ustar waylanstaff00000000000000DEFAULT: input_ext: .text normalize: True # comment out next line to run these tests #skip: True Yuri-Footnotes: extensions: footnotes skip: True Markdown-2.6.9/tests/pl/Tests_2004/Tidyness.html0000644000076500000240000000020513064117426021745 0ustar waylanstaff00000000000000

    A list within a blockquote:

    • asterisk 1
    • asterisk 2
    • asterisk 3
    Markdown-2.6.9/tests/pl/Tests_2004/Yuri-Attributes.html0000644000076500000240000000151113064117426023220 0ustar waylanstaff00000000000000

    Lorem ipsum

    Dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    • Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    • Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur2. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    Markdown-2.6.9/tests/pl/Tests_2004/Yuri-Email.html0000644000076500000240000000112713064117426022124 0ustar waylanstaff00000000000000

    Lorem ipsum yuri@domain.org, etc.

    Markdown-2.6.9/tests/pl/Tests_2004/Yuri-Footnotes.html0000644000076500000240000000435613064117426023064 0ustar waylanstaff00000000000000

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua1. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur2. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore3 magna aliqua.

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


    1. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
    2. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

      Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

    3. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    Markdown-2.6.9/tests/pl/Tests_2004/Yuri-Links-in-Headers.html0000644000076500000240000000046513064117426024136 0ustar waylanstaff00000000000000

    A plain header

    Let's first have a plain header

    An underlined header

    (That's also useful)

    A header with a link

    First with a hash

    Another with a link

    This time underlined

    Markdown-2.6.9/tests/pl/Tests_2007/0000755000076500000240000000000013145427672017272 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/pl/Tests_2007/Amps and angle encoding.html0000644000076500000240000000077113064117426024417 0ustar waylanstaff00000000000000

    AT&T has an ampersand in their name.

    AT&T is another way to write it.

    This & that.

    4 < 5.

    6 > 5.

    Here's a link with an ampersand in the URL.

    Here's a link with an amersand in the link text: AT&T.

    Here's an inline link.

    Here's an inline link.

    Markdown-2.6.9/tests/pl/Tests_2007/Auto links.html0000644000076500000240000000104213064117426022157 0ustar waylanstaff00000000000000

    Link: http://example.com/.

    With an ampersand: http://example.com/?foo=1&bar=2

    Blockquoted: http://example.com/

    Auto-links should not occur here: <http://example.com/>

    or here: <http://example.com/>
    
    Markdown-2.6.9/tests/pl/Tests_2007/Backslash escapes.html0000644000076500000240000000326113064117426023452 0ustar waylanstaff00000000000000

    These should all get escaped:

    Backslash: \

    Backtick: `

    Asterisk: *

    Underscore: _

    Left brace: {

    Right brace: }

    Left bracket: [

    Right bracket: ]

    Left paren: (

    Right paren: )

    Greater-than: >

    Hash: #

    Period: .

    Bang: !

    Plus: +

    Minus: -

    These should not, because they occur within a code block:

    Backslash: \\
    
    Backtick: \`
    
    Asterisk: \*
    
    Underscore: \_
    
    Left brace: \{
    
    Right brace: \}
    
    Left bracket: \[
    
    Right bracket: \]
    
    Left paren: \(
    
    Right paren: \)
    
    Greater-than: \>
    
    Hash: \#
    
    Period: \.
    
    Bang: \!
    
    Plus: \+
    
    Minus: \-
    

    Nor should these, which occur in code spans:

    Backslash: \\

    Backtick: \`

    Asterisk: \*

    Underscore: \_

    Left brace: \{

    Right brace: \}

    Left bracket: \[

    Right bracket: \]

    Left paren: \(

    Right paren: \)

    Greater-than: \>

    Hash: \#

    Period: \.

    Bang: \!

    Plus: \+

    Minus: \-

    These should get escaped, even though they're matching pairs for other Markdown constructs:

    *asterisks*

    _underscores_

    `backticks`

    This is a code span with a literal backslash-backtick sequence: \`

    This is a tag with unescaped backticks bar.

    This is a tag with backslashes bar.

    Markdown-2.6.9/tests/pl/Tests_2007/Blockquotes with code blocks.html0000644000076500000240000000027213064117426025532 0ustar waylanstaff00000000000000

    Example:

    sub status {
        print "working";
    }
    

    Or:

    sub status {
        return "working";
    }
    
    Markdown-2.6.9/tests/pl/Tests_2007/Code Blocks.html0000644000076500000240000000047013064117426022222 0ustar waylanstaff00000000000000
    code block on the first line
    

    Regular text.

    code block indented by spaces
    

    Regular text.

    the lines in this block  
    all contain trailing spaces  
    

    Regular Text.

    code block on the last line
    
    Markdown-2.6.9/tests/pl/Tests_2007/Code Spans.html0000644000076500000240000000033613064117426022072 0ustar waylanstaff00000000000000

    <test a=" content of attribute ">

    Fix for backticks within HTML tag: like this

    Here's how you put `backticks` in a code span.

    Markdown-2.6.9/tests/pl/Tests_2007/Hard-wrapped paragraphs with list-like lines.html0000644000076500000240000000032313064117426030503 0ustar waylanstaff00000000000000

    In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.

    Here's one with a bullet. * criminey.

    Markdown-2.6.9/tests/pl/Tests_2007/Horizontal rules.html0000644000076500000240000000066113064117426023420 0ustar waylanstaff00000000000000

    Dashes:





    ---
    




    - - -
    

    Asterisks:





    ***
    




    * * *
    

    Underscores:





    ___
    




    _ _ _
    
    Markdown-2.6.9/tests/pl/Tests_2007/Images.html0000644000076500000240000000131613064117426021357 0ustar waylanstaff00000000000000

    Alt text

    Alt text

    Inline within a paragraph: alt text.

    alt text

    alt text

    alt text

    alt text.

    Empty

    this is a stupid URL

    alt text

    alt text

    Markdown-2.6.9/tests/pl/Tests_2007/Inline HTML (Advanced).html0000644000076500000240000000053213064117426023723 0ustar waylanstaff00000000000000

    Simple block on one line:

    foo

    And nested without indentation:

    foo
    bar

    And with attributes:

    This was broken in 1.0.2b7:

    foo
    Markdown-2.6.9/tests/pl/Tests_2007/Inline HTML (Simple).html0000644000076500000240000000142013064117426023444 0ustar waylanstaff00000000000000

    Here's a simple block:

    foo

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    foo

    This should just be an HTML comment:

    Multiline:

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    Code:

    <hr />
    

    Hr's:










    Markdown-2.6.9/tests/pl/Tests_2007/Inline HTML comments.html0000644000076500000240000000027413064117426023725 0ustar waylanstaff00000000000000

    Paragraph one.

    Paragraph two.

    The end.

    Markdown-2.6.9/tests/pl/Tests_2007/Links, inline style.html0000644000076500000240000000147413064117426023673 0ustar waylanstaff00000000000000

    Just a URL.

    URL and title.

    URL and title.

    URL and title.

    URL and title.

    URL wrapped in angle brackets.

    URL w/ angle brackets + title.

    Empty.

    With parens in the URL

    (With outer parens and parens in url)

    With parens in the URL

    (With outer parens and parens in url)

    Markdown-2.6.9/tests/pl/Tests_2007/Links, reference style.html0000644000076500000240000000214513064117426024347 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Foo bar.

    With embedded [brackets].

    Indented once.

    Indented twice.

    Indented thrice.

    Indented [four][] times.

    [four]: /url
    

    this should work

    So should this.

    And this.

    And this.

    And this.

    But not [that] [].

    Nor [that][].

    Nor [that].

    [Something in brackets like this should work]

    [Same with this.]

    In this case, this points to something else.

    Backslashing should suppress [this] and [this].


    Here's one where the link breaks across lines.

    Here's another where the link breaks across lines, but with a line-ending space.

    Markdown-2.6.9/tests/pl/Tests_2007/Links, shortcut references.html0000644000076500000240000000040013064117426025235 0ustar waylanstaff00000000000000

    This is the simple case.

    This one has a line break.

    This one has a line break with a line-ending space.

    this and the other

    Markdown-2.6.9/tests/pl/Tests_2007/Literal quotes in titles.html0000644000076500000240000000024313064117426024721 0ustar waylanstaff00000000000000

    Foo bar.

    Foo bar.

    Markdown-2.6.9/tests/pl/Tests_2007/Markdown Documentation - Basics.html0000644000076500000240000002225013064117426026030 0ustar waylanstaff00000000000000

    Markdown: Basics

    Getting the Gist of Markdown's Formatting Syntax

    This page offers a brief overview of what it's like to use Markdown. The syntax page provides complete, detailed documentation for every feature, but Markdown should be very easy to pick up simply by looking at a few examples of it in action. The examples on this page are written in a before/after style, showing example syntax and the HTML output produced by Markdown.

    It's also helpful to simply try Markdown out; the Dingus is a web application that allows you type your own Markdown-formatted text and translate it to XHTML.

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.

    Paragraphs, Headers, Blockquotes

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    Markdown offers two styles of headers: Setext and atx. Setext-style headers for <h1> and <h2> are created by "underlining" with equal signs (=) and hyphens (-), respectively. To create an atx-style header, you put 1-6 hash marks (#) at the beginning of the line -- the number of hashes equals the resulting HTML header level.

    Blockquotes are indicated using email-style '>' angle brackets.

    Markdown:

    A First Level Header
    ====================
    
    A Second Level Header
    ---------------------
    
    Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.
    
    The quick brown fox jumped over the lazy
    dog's back.
    
    ### Header 3
    
    > This is a blockquote.
    > 
    > This is the second paragraph in the blockquote.
    >
    > ## This is an H2 in a blockquote
    

    Output:

    <h1>A First Level Header</h1>
    
    <h2>A Second Level Header</h2>
    
    <p>Now is the time for all good men to come to
    the aid of their country. This is just a
    regular paragraph.</p>
    
    <p>The quick brown fox jumped over the lazy
    dog's back.</p>
    
    <h3>Header 3</h3>
    
    <blockquote>
        <p>This is a blockquote.</p>
    
        <p>This is the second paragraph in the blockquote.</p>
    
        <h2>This is an H2 in a blockquote</h2>
    </blockquote>
    

    Phrase Emphasis

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    Markdown:

    Some of these words *are emphasized*.
    Some of these words _are emphasized also_.
    
    Use two asterisks for **strong emphasis**.
    Or, if you prefer, __use two underscores instead__.
    

    Output:

    <p>Some of these words <em>are emphasized</em>.
    Some of these words <em>are emphasized also</em>.</p>
    
    <p>Use two asterisks for <strong>strong emphasis</strong>.
    Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    

    Lists

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, +, and -) as list markers. These three markers are interchangable; this:

    *   Candy.
    *   Gum.
    *   Booze.
    

    this:

    +   Candy.
    +   Gum.
    +   Booze.
    

    and this:

    -   Candy.
    -   Gum.
    -   Booze.
    

    all produce the same output:

    <ul>
    <li>Candy.</li>
    <li>Gum.</li>
    <li>Booze.</li>
    </ul>
    

    Ordered (numbered) lists use regular numbers, followed by periods, as list markers:

    1.  Red
    2.  Green
    3.  Blue
    

    Output:

    <ol>
    <li>Red</li>
    <li>Green</li>
    <li>Blue</li>
    </ol>
    

    If you put blank lines between items, you'll get <p> tags for the list item text. You can create multi-paragraph list items by indenting the paragraphs by 4 spaces or 1 tab:

    *   A list item.
    
        With multiple paragraphs.
    
    *   Another item in the list.
    

    Output:

    <ul>
    <li><p>A list item.</p>
    <p>With multiple paragraphs.</p></li>
    <li><p>Another item in the list.</p></li>
    </ul>
    

    Links

    Markdown supports two styles for creating links: inline and reference. With both styles, you use square brackets to delimit the text you want to turn into a link.

    Inline-style links use parentheses immediately after the link text. For example:

    This is an [example link](http://example.com/).
    

    Output:

    <p>This is an <a href="http://example.com/">
    example link</a>.</p>
    

    Optionally, you may include a title attribute in the parentheses:

    This is an [example link](http://example.com/ "With a Title").
    

    Output:

    <p>This is an <a href="http://example.com/" title="With a Title">
    example link</a>.</p>
    

    Reference-style links allow you to refer to your links by names, which you define elsewhere in your document:

    I get 10 times more traffic from [Google][1] than from
    [Yahoo][2] or [MSN][3].
    
    [1]: http://google.com/        "Google"
    [2]: http://search.yahoo.com/  "Yahoo Search"
    [3]: http://search.msn.com/    "MSN Search"
    

    Output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    title="MSN Search">MSN</a>.</p>
    

    The title attribute is optional. Link names may contain letters, numbers and spaces, but are not case sensitive:

    I start my morning with a cup of coffee and
    [The New York Times][NY Times].
    
    [ny times]: http://www.nytimes.com/
    

    Output:

    <p>I start my morning with a cup of coffee and
    <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    

    Images

    Image syntax is very much like link syntax.

    Inline (titles are optional):

    ![alt text](/path/to/img.jpg "Title")
    

    Reference-style:

    ![alt text][id]
    
    [id]: /path/to/img.jpg "Title"
    

    Both of the above examples produce the same output:

    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    

    Code

    In a regular paragraph, you can create code span by wrapping text in backtick quotes. Any ampersands (&) and angle brackets (< or >) will automatically be translated into HTML entities. This makes it easy to use Markdown to write about HTML example code:

    I strongly recommend against using any `<blink>` tags.
    
    I wish SmartyPants used named entities like `&mdash;`
    instead of decimal-encoded entites like `&#8212;`.
    

    Output:

    <p>I strongly recommend against using any
    <code>&lt;blink&gt;</code> tags.</p>
    
    <p>I wish SmartyPants used named entities like
    <code>&amp;mdash;</code> instead of decimal-encoded
    entites like <code>&amp;#8212;</code>.</p>
    

    To specify an entire block of pre-formatted code, indent every line of the block by 4 spaces or 1 tab. Just like with code spans, &, <, and > characters will be escaped automatically.

    Markdown:

    If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:
    
        <blockquote>
            <p>For example.</p>
        </blockquote>
    

    Output:

    <p>If you want your page to validate under XHTML 1.0 Strict,
    you've got to put paragraph tags in your blockquotes:</p>
    
    <pre><code>&lt;blockquote&gt;
        &lt;p&gt;For example.&lt;/p&gt;
    &lt;/blockquote&gt;
    </code></pre>
    
    Markdown-2.6.9/tests/pl/Tests_2007/Markdown Documentation - Syntax.html0000644000076500000240000007605113064117426026122 0ustar waylanstaff00000000000000

    Markdown: Syntax

    Note: This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL.


    Overview

    Philosophy

    Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

    Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email.

    To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email.

    Inline HTML

    Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements -- e.g. <div>, <table>, <pre>, <p>, etc. -- must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    For example, to add an HTML table to a Markdown article:

    This is a regular paragraph.
    
    <table>
        <tr>
            <td>Foo</td>
        </tr>
    </table>
    
    This is another regular paragraph.
    

    Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can't use Markdown-style *emphasis* inside an HTML block.

    Span-level HTML tags -- e.g. <span>, <cite>, or <del> -- can be used anywhere in a Markdown paragraph, list item, or header. If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you'd prefer to use HTML <a> or <img> tags instead of Markdown's link or image syntax, go right ahead.

    Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

    Automatic Escaping for Special Characters

    In HTML, there are two characters that demand special treatment: < and &. Left angle brackets are used to start tags; ampersands are used to denote HTML entities. If you want to use them as literal characters, you must escape them as entities, e.g. &lt;, and &amp;.

    Ampersands in particular are bedeviling for web writers. If you want to write about 'AT&T', you need to write 'AT&amp;T'. You even need to escape ampersands within URLs. Thus, if you want to link to:

    http://images.google.com/images?num=30&q=larry+bird
    

    you need to encode the URL as:

    http://images.google.com/images?num=30&amp;q=larry+bird
    

    in your anchor tag href attribute. Needless to say, this is easy to forget, and is probably the single most common source of HTML validation errors in otherwise well-marked-up web sites.

    Markdown allows you to use these characters naturally, taking care of all the necessary escaping for you. If you use an ampersand as part of an HTML entity, it remains unchanged; otherwise it will be translated into &amp;.

    So, if you want to include a copyright symbol in your article, you can write:

    &copy;
    

    and Markdown will leave it alone. But if you write:

    AT&T
    

    Markdown will translate it to:

    AT&amp;T
    

    Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

    4 < 5
    

    Markdown will translate it to:

    4 &lt; 5
    

    However, inside Markdown code spans and blocks, angle brackets and ampersands are always encoded automatically. This makes it easy to use Markdown to write about HTML code. (As opposed to raw HTML, which is a terrible format for writing about HTML syntax, because every single < and & in your example code needs to be escaped.)


    Block Elements

    Paragraphs and Line Breaks

    A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be intended with spaces or tabs.

    The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

    When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

    Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

    Markdown supports two styles of headers, Setext and atx.

    Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:

    This is an H1
    =============
    
    This is an H2
    -------------
    

    Any number of underlining ='s or -'s will work.

    Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:

    # This is an H1
    
    ## This is an H2
    
    ###### This is an H6
    

    Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :

    # This is an H1 #
    
    ## This is an H2 ##
    
    ### This is an H3 ######
    

    Blockquotes

    Markdown uses email-style > characters for blockquoting. If you're familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a > before every line:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    > 
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    > id sem consectetuer libero luctus adipiscing.
    

    Markdown allows you to be lazy and only put the > before the first line of a hard-wrapped paragraph:

    > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
    Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
    
    > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
    id sem consectetuer libero luctus adipiscing.
    

    Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of >:

    > This is the first level of quoting.
    >
    > > This is nested blockquote.
    >
    > Back to the first level.
    

    Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:

    > ## This is a header.
    > 
    > 1.   This is the first list item.
    > 2.   This is the second list item.
    > 
    > Here's some example code:
    > 
    >     return shell_exec("echo $input | $markdown_script");
    

    Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu.

    Lists

    Markdown supports ordered (numbered) and unordered (bulleted) lists.

    Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:

    *   Red
    *   Green
    *   Blue
    

    is equivalent to:

    +   Red
    +   Green
    +   Blue
    

    and:

    -   Red
    -   Green
    -   Blue
    

    Ordered lists use numbers followed by periods:

    1.  Bird
    2.  McHale
    3.  Parish
    

    It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:

    <ol>
    <li>Bird</li>
    <li>McHale</li>
    <li>Parish</li>
    </ol>
    

    If you instead wrote the list in Markdown like this:

    1.  Bird
    1.  McHale
    1.  Parish
    

    or even:

    3. Bird
    1. McHale
    8. Parish
    

    you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to.

    If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number.

    List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab.

    To make lists look nice, you can wrap items with hanging indents:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
        Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
        viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
        Suspendisse id sem consectetuer libero luctus adipiscing.
    

    But if you want to be lazy, you don't have to:

    *   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
    *   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.
    

    If list items are separated by blank lines, Markdown will wrap the items in <p> tags in the HTML output. For example, this input:

    *   Bird
    *   Magic
    

    will turn into:

    <ul>
    <li>Bird</li>
    <li>Magic</li>
    </ul>
    

    But this:

    *   Bird
    
    *   Magic
    

    will turn into:

    <ul>
    <li><p>Bird</p></li>
    <li><p>Magic</p></li>
    </ul>
    

    List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be intended by either 4 spaces or one tab:

    1.  This is a list item with two paragraphs. Lorem ipsum dolor
        sit amet, consectetuer adipiscing elit. Aliquam hendrerit
        mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in, laoreet
        vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
        sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus adipiscing.
    

    It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:

    *   This is a list item with two paragraphs.
    
        This is the second paragraph in the list item. You're
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.
    
    *   Another item in the same list.
    

    To put a blockquote within a list item, the blockquote's > delimiters need to be indented:

    *   A list item with a blockquote:
    
        > This is a blockquote
        > inside a list item.
    

    To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:

    *   A list item with a code block:
    
            <code goes here>
    

    It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:

    1986. What a great season.
    

    In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:

    1986\. What a great season.
    

    Code Blocks

    Pre-formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a code block are interpreted literally. Markdown wraps a code block in both <pre> and <code> tags.

    To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:

    This is a normal paragraph:
    
        This is a code block.
    

    Markdown will generate:

    <p>This is a normal paragraph:</p>
    
    <pre><code>This is a code block.
    </code></pre>
    

    One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:

    Here is an example of AppleScript:
    
        tell application "Foo"
            beep
        end tell
    

    will turn into:

    <p>Here is an example of AppleScript:</p>
    
    <pre><code>tell application "Foo"
        beep
    end tell
    </code></pre>
    

    A code block continues until it reaches a line that is not indented (or the end of the article).

    Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities. This makes it very easy to include example HTML source code using Markdown -- just paste it and indent it, and Markdown will handle the hassle of encoding the ampersands and angle brackets. For example, this:

        <div class="footer">
            &copy; 2004 Foo Corporation
        </div>
    

    will turn into:

    <pre><code>&lt;div class="footer"&gt;
        &amp;copy; 2004 Foo Corporation
    &lt;/div&gt;
    </code></pre>
    

    Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax.

    Horizontal Rules

    You can produce a horizontal rule tag (<hr />) by placing three or more hyphens, asterisks, or underscores on a line by themselves. If you wish, you may use spaces between the hyphens or asterisks. Each of the following lines will produce a horizontal rule:

    * * *
    
    ***
    
    *****
    
    - - -
    
    ---------------------------------------
    
    _ _ _
    

    Span Elements

    Markdown supports two style of links: inline and reference.

    In both styles, the link text is delimited by [square brackets].

    To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

    This is [an example](http://example.com/ "Title") inline link.
    
    [This link](http://example.net/) has no title attribute.
    

    Will produce:

    <p>This is <a href="http://example.com/" title="Title">
    an example</a> inline link.</p>
    
    <p><a href="http://example.net/">This link</a> has no
    title attribute.</p>
    

    If you're referring to a local resource on the same server, you can use relative paths:

    See my [About](/about/) page for details.
    

    Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

    This is [an example][id] reference-style link.
    

    You can optionally use a space to separate the sets of brackets:

    This is [an example] [id] reference-style link.
    

    Then, anywhere in the document, you define your link label like this, on a line by itself:

    [id]: http://example.com/  "Optional Title Here"
    

    That is:

    • Square brackets containing the link identifier (optionally indented from the left margin using up to three spaces);
    • followed by a colon;
    • followed by one or more spaces (or tabs);
    • followed by the URL for the link;
    • optionally followed by a title attribute for the link, enclosed in double or single quotes.

    The link URL may, optionally, be surrounded by angle brackets:

    [id]: <http://example.com/>  "Optional Title Here"
    

    You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:

    [id]: http://example.com/longish/path/to/resource/here
        "Optional Title Here"
    

    Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output.

    Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:

    [link text][a]
    [link text][A]
    

    are equivalent.

    The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:

    [Google][]
    

    And then define the link:

    [Google]: http://google.com/
    

    Because link names may contain spaces, this shortcut even works for multiple words in the link text:

    Visit [Daring Fireball][] for more information.
    

    And then define the link:

    [Daring Fireball]: http://daringfireball.net/
    

    Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes.

    Here's an example of reference links in action:

    I get 10 times more traffic from [Google] [1] than from
    [Yahoo] [2] or [MSN] [3].
    
      [1]: http://google.com/        "Google"
      [2]: http://search.yahoo.com/  "Yahoo Search"
      [3]: http://search.msn.com/    "MSN Search"
    

    Using the implicit link name shortcut, you could instead write:

    I get 10 times more traffic from [Google][] than from
    [Yahoo][] or [MSN][].
    
      [google]: http://google.com/        "Google"
      [yahoo]:  http://search.yahoo.com/  "Yahoo Search"
      [msn]:    http://search.msn.com/    "MSN Search"
    

    Both of the above examples will produce the following HTML output:

    <p>I get 10 times more traffic from <a href="http://google.com/"
    title="Google">Google</a> than from
    <a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
    or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>
    

    For comparison, here is the same paragraph written using Markdown's inline link style:

    I get 10 times more traffic from [Google](http://google.com/ "Google")
    than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
    [MSN](http://search.msn.com/ "MSN Search").
    

    The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text.

    With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose.

    Emphasis

    Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag; double *'s or _'s will be wrapped with an HTML <strong> tag. E.g., this input:

    *single asterisks*
    
    _single underscores_
    
    **double asterisks**
    
    __double underscores__
    

    will produce:

    <em>single asterisks</em>
    
    <em>single underscores</em>
    
    <strong>double asterisks</strong>
    
    <strong>double underscores</strong>
    

    You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span.

    Emphasis can be used in the middle of a word:

    un*fucking*believable
    

    But if you surround an * or _ with spaces, it'll be treated as a literal asterisk or underscore.

    To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

    \*this text is surrounded by literal asterisks\*
    

    Code

    To indicate a span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

    Use the `printf()` function.
    

    will produce:

    <p>Use the <code>printf()</code> function.</p>
    

    To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:

    ``There is a literal backtick (`) here.``
    

    which will produce this:

    <p><code>There is a literal backtick (`) here.</code></p>
    

    The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:

    A single backtick in a code span: `` ` ``
    
    A backtick-delimited string in a code span: `` `foo` ``
    

    will produce:

    <p>A single backtick in a code span: <code>`</code></p>
    
    <p>A backtick-delimited string in a code span: <code>`foo`</code></p>
    

    With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:

    Please don't use any `<blink>` tags.
    

    into:

    <p>Please don't use any <code>&lt;blink&gt;</code> tags.</p>
    

    You can write this:

    `&#8212;` is the decimal-encoded equivalent of `&mdash;`.
    

    to produce:

    <p><code>&amp;#8212;</code> is the decimal-encoded
    equivalent of <code>&amp;mdash;</code>.</p>
    

    Images

    Admittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format.

    Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
    

    That is:

    • An exclamation mark: !;
    • followed by a set of square brackets, containing the alt attribute text for the image;
    • followed by a set of parentheses, containing the URL or path to the image, and an optional title attribute enclosed in double or single quotes.

    Reference-style image syntax looks like this:

    ![Alt text][id]
    

    Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:

    [id]: url/to/image  "Optional title attribute"
    

    As of this writing, Markdown has no syntax for specifying the dimensions of an image; if this is important to you, you can simply use regular HTML <img> tags.


    Miscellaneous

    Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

    <http://example.com/>
    

    Markdown will turn this into:

    <a href="http://example.com/">http://example.com/</a>
    

    Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:

    <address@example.com>
    

    into something like this:

    <a href="&#x6D;&#x61;i&#x6C;&#x74;&#x6F;:&#x61;&#x64;&#x64;&#x72;&#x65;
    &#115;&#115;&#64;&#101;&#120;&#x61;&#109;&#x70;&#x6C;e&#x2E;&#99;&#111;
    &#109;">&#x61;&#x64;&#x64;&#x72;&#x65;&#115;&#115;&#64;&#101;&#120;&#x61;
    &#109;&#x70;&#x6C;e&#x2E;&#99;&#111;&#109;</a>
    

    which will render in a browser as a clickable link to "address@example.com".

    (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.)

    Backslash Escapes

    Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown's formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em> tag), you can backslashes before the asterisks, like this:

    \*literal asterisks\*
    

    Markdown provides backslash escapes for the following characters:

    \   backslash
    `   backtick
    *   asterisk
    _   underscore
    {}  curly braces
    []  square brackets
    ()  parentheses
    #   hash mark
    +   plus sign
    -   minus sign (hyphen)
    .   dot
    !   exclamation mark
    
    Markdown-2.6.9/tests/pl/Tests_2007/Nested blockquotes.html0000644000076500000240000000015113064117426023704 0ustar waylanstaff00000000000000

    foo

    bar

    foo

    Markdown-2.6.9/tests/pl/Tests_2007/Ordered and unordered lists.html0000644000076500000240000000324513064117426025353 0ustar waylanstaff00000000000000

    Unordered

    Asterisks tight:

    • asterisk 1
    • asterisk 2
    • asterisk 3

    Asterisks loose:

    • asterisk 1

    • asterisk 2

    • asterisk 3


    Pluses tight:

    • Plus 1
    • Plus 2
    • Plus 3

    Pluses loose:

    • Plus 1

    • Plus 2

    • Plus 3


    Minuses tight:

    • Minus 1
    • Minus 2
    • Minus 3

    Minuses loose:

    • Minus 1

    • Minus 2

    • Minus 3

    Ordered

    Tight:

    1. First
    2. Second
    3. Third

    and:

    1. One
    2. Two
    3. Three

    Loose using tabs:

    1. First

    2. Second

    3. Third

    and using spaces:

    1. One

    2. Two

    3. Three

    Multiple paragraphs:

    1. Item 1, graf one.

      Item 2. graf two. The quick brown fox jumped over the lazy dog's back.

    2. Item 2.

    3. Item 3.

    Nested

    • Tab
      • Tab
        • Tab

    Here's another:

    1. First
    2. Second:
      • Fee
      • Fie
      • Foe
    3. Third

    Same thing but with paragraphs:

    1. First

    2. Second:

      • Fee
      • Fie
      • Foe
    3. Third

    This was an error in Markdown 1.0.1:

    • this

      • sub

      that

    Markdown-2.6.9/tests/pl/Tests_2007/Strong and em together.html0000644000076500000240000000032713064117426024336 0ustar waylanstaff00000000000000

    This is strong and em.

    So is this word.

    This is strong and em.

    So is this word.

    Markdown-2.6.9/tests/pl/Tests_2007/Tabs.html0000644000076500000240000000066713064117426021053 0ustar waylanstaff00000000000000
    • this is a list item indented with tabs

    • this is a list item indented with spaces

    Code:

    this code block is indented by one tab
    

    And:

        this code block is indented by two tabs
    

    And:

    +   this is an example list item
        indented with tabs
    
    +   this is an example list item
        indented with spaces
    
    Markdown-2.6.9/tests/pl/Tests_2007/test.cfg0000644000076500000240000000101513064117426020720 0ustar waylanstaff00000000000000DEFAULT: input_ext: .text normalize: True # comment out next line to run these tests #skip: True Images: # the attributes don't get ordered the same so we skip this skip: True Code Blocks: # some weird whitespace issue skip: True Links, reference style: # weird issue with nested brackets TODO: fixme skip: True Backslash escapes: # backticks in raw html attributes TODO: fixme skip: True Code Spans: # more backticks in raw html attributes TODO: fixme skip: True Markdown-2.6.9/tests/pl/Tests_2007/Tidyness.html0000644000076500000240000000020513064117426021750 0ustar waylanstaff00000000000000

    A list within a blockquote:

    • asterisk 1
    • asterisk 2
    • asterisk 3
    Markdown-2.6.9/tests/plugins.py0000644000076500000240000000730713064117426017140 0ustar waylanstaff00000000000000import traceback from nose.plugins import Plugin from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin class MarkdownSyntaxError(Exception): pass class Markdown(ErrorClassPlugin): """ Add MarkdownSyntaxError and ensure proper formatting. """ mdsyntax = ErrorClass( MarkdownSyntaxError, label='MarkdownSyntaxError', isfailure=True ) enabled = True def configure(self, options, conf): self.conf = conf def addError(self, test, err): """ Ensure other plugins see the error by returning nothing here. """ pass def formatError(self, test, err): """ Remove unnessecary and unhelpful traceback from error report. """ et, ev, tb = err if et.__name__ == 'MarkdownSyntaxError': return et, ev, '' return err def escape(html): """ Escape HTML for display as source within HTML. """ html = html.replace('&', '&') html = html.replace('<', '<') html = html.replace('>', '>') return html class HtmlOutput(Plugin): """Output test results as ugly, unstyled html. """ name = 'html-output' score = 2 # run late enabled = True def __init__(self): super(HtmlOutput, self).__init__() self.html = [ '', 'Test output', '' ] def configure(self, options, conf): self.conf = conf def addSuccess(self, test): self.html.append('ok') def addError(self, test, err): err = self.formatErr(err) self.html.append('ERROR') self.html.append('
    %s
    ' % escape(err)) def addFailure(self, test, err): err = self.formatErr(err) self.html.append('FAIL') self.html.append('
    %s
    ' % escape(err)) def finalize(self, result): self.html.append('
    ') self.html.append( "Ran %d test%s" % (result.testsRun, result.testsRun != 1 and "s" or "") ) self.html.append('
    ') self.html.append('
    ') if not result.wasSuccessful(): self.html.extend(['FAILED (', 'failures=%d ' % len(result.failures), 'errors=%d' % len(result.errors)]) for cls in list(result.errorClasses.keys()): storage, label, isfail = result.errorClasses[cls] if len(storage): self.html.append(' %ss=%d' % (label, len(storage))) self.html.append(')') else: self.html.append('OK') self.html.append('
    ') f = open('test-output.html', 'w') for l in self.html: f.write(l) f.close() def formatErr(self, err): exctype, value, tb = err if not isinstance(value, exctype): value = exctype(value) return ''.join(traceback.format_exception(exctype, value, tb)) def startContext(self, ctx): try: n = ctx.__name__ except AttributeError: n = str(ctx).replace('<', '').replace('>', '') self.html.extend(['
    ', '', n, '']) try: path = ctx.__file__.replace('.pyc', '.py') self.html.extend(['
    ', path, '
    ']) except AttributeError: pass def stopContext(self, ctx): self.html.append('
    ') def startTest(self, test): self.html.extend([ '
    ', test.shortDescription() or str(test), '' ]) def stopTest(self, test): self.html.append('
    ') Markdown-2.6.9/tests/safe_mode/0000755000076500000240000000000013145427672017027 5ustar waylanstaff00000000000000Markdown-2.6.9/tests/safe_mode/html_then_blockquote.html0000644000076500000240000000036213064117426024121 0ustar waylanstaff00000000000000

    to:

    <td /><td style="text-align: center; white-space: nowrap;"><br />

    3) You don't need to alter all localization files. Adding the new labels to the en_US files will do it.

    Markdown-2.6.9/tests/safe_mode/html_then_blockquote.txt0000644000076500000240000000026713064117426024000 0ustar waylanstaff00000000000000to:
    > 3) You don't need to alter all localization files. > Adding the new labels to the en_US files will do it. Markdown-2.6.9/tests/safe_mode/inline-html-advanced.html0000644000076500000240000000033213064117426023667 0ustar waylanstaff00000000000000

    Simple block on one line:

    <div>foo</div>

    And nested without indentation:

    <div> <div> <div> foo </div> </div> <div>bar</div> </div>

    Markdown-2.6.9/tests/safe_mode/inline-html-advanced.txt0000644000076500000240000000020613064117426023542 0ustar waylanstaff00000000000000Simple block on one line:
    foo
    And nested without indentation:
    foo
    bar
    Markdown-2.6.9/tests/safe_mode/inline-html-comments.html0000644000076500000240000000033513064117426023752 0ustar waylanstaff00000000000000

    Paragraph one.

    <!-- This is a simple comment -->

    <!-- This is another comment. -->

    Paragraph two.

    <!-- one comment block -- -- with two comments -->

    The end.

    Markdown-2.6.9/tests/safe_mode/inline-html-comments.txt0000644000076500000240000000024413064117426023624 0ustar waylanstaff00000000000000Paragraph one. Paragraph two. The end. Markdown-2.6.9/tests/safe_mode/inline-html-simple.html0000644000076500000240000000201713064117426023415 0ustar waylanstaff00000000000000

    Here's a simple block:

    <div> foo </div>

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    <div> <div> <div> foo </div> </div> </div>

    This should just be an HTML comment:

    <!-- Comment -->

    Multiline:

    <!-- Blah Blah -->

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    <!-- foo -->

    Code:

    <hr />
    

    Hr's:

    <hr>

    <hr/>

    <hr />

    <hr>

    <hr/>

    <hr />

    <hr class="foo" id="bar" />

    <hr class="foo" id="bar"/>

    <hr class="foo" id="bar" >

    <some weird stuff>

    Markdown-2.6.9/tests/safe_mode/inline-html-simple.txt0000644000076500000240000000112213064117426023264 0ustar waylanstaff00000000000000Here's a simple block:
    foo
    This should be a code block, though:
    foo
    As should this:
    foo
    Now, nested:
    foo
    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
    Hr's:








    Markdown-2.6.9/tests/safe_mode/link-targets.html0000644000076500000240000000013113064117426022305 0ustar waylanstaff00000000000000

    XSS See http://security.stackexchange.com/q/30330/1261 for details.

    Markdown-2.6.9/tests/safe_mode/link-targets.txt0000644000076500000240000000015213064117426022163 0ustar waylanstaff00000000000000[XSS](javascript://%0Aalert%28'XSS'%29;) See http://security.stackexchange.com/q/30330/1261 for details. Markdown-2.6.9/tests/safe_mode/remove.html0000644000076500000240000000113013064117426021176 0ustar waylanstaff00000000000000

    Here's a simple block:

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    This should just be an HTML comment:

    Multiline:

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    Code:

    <hr />
    

    Hr's:

    Markdown-2.6.9/tests/safe_mode/remove.txt0000644000076500000240000000112213064117426021052 0ustar waylanstaff00000000000000Here's a simple block:
    foo
    This should be a code block, though:
    foo
    As should this:
    foo
    Now, nested:
    foo
    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
    Hr's:








    Markdown-2.6.9/tests/safe_mode/replace.html0000644000076500000240000000145213064117426021323 0ustar waylanstaff00000000000000

    Here's a simple block:

    [HTML_REMOVED]

    This should be a code block, though:

    <div>
        foo
    </div>
    

    As should this:

    <div>foo</div>
    

    Now, nested:

    [HTML_REMOVED]

    This should just be an HTML comment:

    [HTML_REMOVED]

    Multiline:

    [HTML_REMOVED]

    Code block:

    <!-- Comment -->
    

    Just plain comment, with trailing spaces on the line:

    [HTML_REMOVED]

    Code:

    <hr />
    

    Hr's:

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    [HTML_REMOVED]

    Markdown-2.6.9/tests/safe_mode/replace.txt0000644000076500000240000000112213064117426021170 0ustar waylanstaff00000000000000Here's a simple block:
    foo
    This should be a code block, though:
    foo
    As should this:
    foo
    Now, nested:
    foo
    This should just be an HTML comment: Multiline: Code block: Just plain comment, with trailing spaces on the line: Code:
    Hr's:








    Markdown-2.6.9/tests/safe_mode/script_tags.html0000644000076500000240000000103113064117426022223 0ustar waylanstaff00000000000000

    This should be stripped/escaped in safe_mode.

    <script> alert("Hello world!") </script>

    With blank lines.

    <script>

    alert("Hello world!")

    </script>

    Now with some weirdness

    <script <!-- alert("Hello world!") </script <> `

    Try another way.

    <script <!-- alert("Hello world!") </script <>

    This time with blank lines.

    <script <!--

    alert("Hello world!")

    </script <>

    Markdown-2.6.9/tests/safe_mode/script_tags.txt0000644000076500000240000000056713064117426022113 0ustar waylanstaff00000000000000This should be stripped/escaped in safe_mode. With blank lines. Now with some weirdness `` This time with blank lines. ', safe=False) return root class StoreUnsafeHtml(markdown.extensions.Extension): def extendMarkdown(self, md, md_globals): md.treeprocessors.add('unsafe', Unsafe(md), '_end') return StoreUnsafeHtml() class TestOrderedDict(unittest.TestCase): """ Test OrderedDict storage class. """ def setUp(self): self.odict = markdown.odict.OrderedDict() self.odict['first'] = 'This' self.odict['third'] = 'a' self.odict['fourth'] = 'self' self.odict['fifth'] = 'test' def testValues(self): """ Test output of OrderedDict.values(). """ self.assertEqual(list(self.odict.values()), ['This', 'a', 'self', 'test']) def testKeys(self): """ Test output of OrderedDict.keys(). """ self.assertEqual( list(self.odict.keys()), ['first', 'third', 'fourth', 'fifth'] ) def testItems(self): """ Test output of OrderedDict.items(). """ self.assertEqual( list(self.odict.items()), [ ('first', 'This'), ('third', 'a'), ('fourth', 'self'), ('fifth', 'test') ] ) def testAddBefore(self): """ Test adding an OrderedDict item before a given key. """ self.odict.add('second', 'is', 'first') self.assertEqual( list(self.odict.items()), [ ('first', 'This'), ('second', 'is'), ('third', 'a'), ('fourth', 'self'), ('fifth', 'test') ] ) def testAddAfterEnd(self): """ Test adding an OrderedDict item after the last key. """ self.odict.add('sixth', '.', '>fifth') self.assertEqual( list(self.odict.items()), [ ('first', 'This'), ('third', 'a'), ('fourth', 'self'), ('fifth', 'test'), ('sixth', '.') ] ) def testAdd_begin(self): """ Test adding an OrderedDict item using "_begin". """ self.odict.add('zero', 'CRAZY', '_begin') self.assertEqual( list(self.odict.items()), [ ('zero', 'CRAZY'), ('first', 'This'), ('third', 'a'), ('fourth', 'self'), ('fifth', 'test') ] ) def testAdd_end(self): """ Test adding an OrderedDict item using "_end". """ self.odict.add('sixth', '.', '_end') self.assertEqual( list(self.odict.items()), [ ('first', 'This'), ('third', 'a'), ('fourth', 'self'), ('fifth', 'test'), ('sixth', '.') ] ) def testAddBadLocation(self): """ Test Error on bad location in OrderedDict.add(). """ self.assertRaises(ValueError, self.odict.add, 'sixth', '.', '' ) def testCommentPrettify(self): """ Test that an ElementTree Comment is prettified properly. """ pretty = markdown.treeprocessors.PrettifyTreeprocessor() pretty.run(self.comment) self.assertEqual( markdown.serializers.to_html_string(self.comment), '\n' ) class testElementTailTests(unittest.TestCase): """ Element Tail Tests """ def setUp(self): self.pretty = markdown.treeprocessors.PrettifyTreeprocessor() def testBrTailNoNewline(self): """ Test that last
    in tree has a new line tail """ root = markdown.util.etree.Element('root') br = markdown.util.etree.SubElement(root, 'br') self.assertEqual(br.tail, None) self.pretty.run(root) self.assertEqual(br.tail, "\n") class testSerializers(unittest.TestCase): """ Test the html and xhtml serializers. """ def testHtml(self): """ Test HTML serialization. """ el = markdown.util.etree.Element('div') p = markdown.util.etree.SubElement(el, 'p') p.text = 'foo' markdown.util.etree.SubElement(el, 'hr') self.assertEqual( markdown.serializers.to_html_string(el), '

    foo


    ' ) def testXhtml(self): """" Test XHTML serialization. """ el = markdown.util.etree.Element('div') p = markdown.util.etree.SubElement(el, 'p') p.text = 'foo' markdown.util.etree.SubElement(el, 'hr') self.assertEqual( markdown.serializers.to_xhtml_string(el), '

    foo


    ' ) def testMixedCaseTags(self): """" Test preservation of tag case. """ el = markdown.util.etree.Element('MixedCase') el.text = 'not valid ' em = markdown.util.etree.SubElement(el, 'EMPHASIS') em.text = 'html' markdown.util.etree.SubElement(el, 'HR') self.assertEqual( markdown.serializers.to_xhtml_string(el), 'not valid html
    ' ) def buildExtension(self): """ Build an extension which registers fakeSerializer. """ def fakeSerializer(elem): # Ignore input and return hardcoded output return '

    foo

    ' class registerFakeSerializer(markdown.extensions.Extension): def extendMarkdown(self, md, md_globals): md.output_formats['fake'] = fakeSerializer return registerFakeSerializer() def testRegisterSerializer(self): self.assertEqual( markdown.markdown( 'baz', extensions=[self.buildExtension()], output_format='fake' ), '

    foo

    ' ) class testAtomicString(unittest.TestCase): """ Test that AtomicStrings are honored (not parsed). """ def setUp(self): md = markdown.Markdown() self.inlineprocessor = md.treeprocessors['inline'] def testString(self): """ Test that a regular string is parsed. """ tree = markdown.util.etree.Element('div') p = markdown.util.etree.SubElement(tree, 'p') p.text = 'some *text*' new = self.inlineprocessor.run(tree) self.assertEqual( markdown.serializers.to_html_string(new), '

    some text

    ' ) def testSimpleAtomicString(self): """ Test that a simple AtomicString is not parsed. """ tree = markdown.util.etree.Element('div') p = markdown.util.etree.SubElement(tree, 'p') p.text = markdown.util.AtomicString('some *text*') new = self.inlineprocessor.run(tree) self.assertEqual( markdown.serializers.to_html_string(new), '

    some *text*

    ' ) def testNestedAtomicString(self): """ Test that a nested AtomicString is not parsed. """ tree = markdown.util.etree.Element('div') p = markdown.util.etree.SubElement(tree, 'p') p.text = markdown.util.AtomicString('*some* ') span1 = markdown.util.etree.SubElement(p, 'span') span1.text = markdown.util.AtomicString('*more* ') span2 = markdown.util.etree.SubElement(span1, 'span') span2.text = markdown.util.AtomicString('*text* ') span3 = markdown.util.etree.SubElement(span2, 'span') span3.text = markdown.util.AtomicString('*here*') span3.tail = markdown.util.AtomicString(' *to*') span2.tail = markdown.util.AtomicString(' *test*') span1.tail = markdown.util.AtomicString(' *with*') new = self.inlineprocessor.run(tree) self.assertEqual( markdown.serializers.to_html_string(new), '

    *some* *more* *text* *here* ' '*to* *test* *with*

    ' ) class TestConfigParsing(unittest.TestCase): def assertParses(self, value, result): self.assertTrue(markdown.util.parseBoolValue(value, False) is result) def testBooleansParsing(self): self.assertParses(True, True) self.assertParses('novalue', None) self.assertParses('yES', True) self.assertParses('FALSE', False) self.assertParses(0., False) self.assertParses('none', False) def testPreserveNone(self): self.assertTrue(markdown.util.parseBoolValue('None', preserve_none=True) is None) self.assertTrue(markdown.util.parseBoolValue(None, preserve_none=True) is None) def testInvalidBooleansParsing(self): self.assertRaises(ValueError, markdown.util.parseBoolValue, 'novalue') class TestCliOptionParsing(unittest.TestCase): """ Test parsing of Command Line Interface Options. """ def setUp(self): self.default_options = { 'input': None, 'output': None, 'encoding': None, 'output_format': 'xhtml1', 'lazy_ol': True, 'extensions': [], 'extension_configs': {}, } self.tempfile = '' def tearDown(self): if os.path.isfile(self.tempfile): os.remove(self.tempfile) def testNoOptions(self): options, logging_level = parse_options([]) self.assertEqual(options, self.default_options) self.assertEqual(logging_level, CRITICAL) def testQuietOption(self): options, logging_level = parse_options(['-q']) self.assertTrue(logging_level > CRITICAL) def testVerboseOption(self): options, logging_level = parse_options(['-v']) self.assertEqual(logging_level, WARNING) def testNoisyOption(self): options, logging_level = parse_options(['--noisy']) self.assertEqual(logging_level, DEBUG) def testInputFileOption(self): options, logging_level = parse_options(['foo.txt']) self.default_options['input'] = 'foo.txt' self.assertEqual(options, self.default_options) def testOutputFileOption(self): options, logging_level = parse_options(['-f', 'foo.html']) self.default_options['output'] = 'foo.html' self.assertEqual(options, self.default_options) def testInputAndOutputFileOptions(self): options, logging_level = parse_options(['-f', 'foo.html', 'foo.txt']) self.default_options['output'] = 'foo.html' self.default_options['input'] = 'foo.txt' self.assertEqual(options, self.default_options) def testEncodingOption(self): options, logging_level = parse_options(['-e', 'utf-8']) self.default_options['encoding'] = 'utf-8' self.assertEqual(options, self.default_options) def testSafeModeOption(self): options, logging_level = parse_options(['-s', 'escape']) self.default_options['safe_mode'] = 'escape' self.assertEqual(options, self.default_options) def testOutputFormatOption(self): options, logging_level = parse_options(['-o', 'html5']) self.default_options['output_format'] = 'html5' self.assertEqual(options, self.default_options) def testNoLazyOlOption(self): options, logging_level = parse_options(['-n']) self.default_options['lazy_ol'] = False self.assertEqual(options, self.default_options) def testExtensionOption(self): options, logging_level = parse_options(['-x', 'markdown.extensions.footnotes']) self.default_options['extensions'] = ['markdown.extensions.footnotes'] self.assertEqual(options, self.default_options) def testMultipleExtensionOptions(self): options, logging_level = parse_options([ '-x', 'markdown.extensions.footnotes', '-x', 'markdown.extensions.smarty' ]) self.default_options['extensions'] = [ 'markdown.extensions.footnotes', 'markdown.extensions.smarty' ] self.assertEqual(options, self.default_options) def create_config_file(self, config): """ Helper to create temp config files. """ if not isinstance(config, markdown.util.string_type): # convert to string config = yaml.dump(config) fd, self.tempfile = tempfile.mkstemp('.yml') with os.fdopen(fd, 'w') as fp: fp.write(config) def testExtensionConfigOption(self): config = { 'markdown.extensions.wikilinks': { 'base_url': 'http://example.com/', 'end_url': '.html', 'html_class': 'test', }, 'markdown.extensions.footnotes:FootnotesExtension': { 'PLACE_MARKER': '~~~footnotes~~~' } } self.create_config_file(config) options, logging_level = parse_options(['-c', self.tempfile]) self.default_options['extension_configs'] = config self.assertEqual(options, self.default_options) def textBoolExtensionConfigOption(self): config = { 'markdown.extensions.toc': { 'title': 'Some Title', 'anchorlink': True, 'permalink': True } } self.create_config_file(config) options, logging_level = parse_options(['-c', self.tempfile]) self.default_options['extension_configs'] = config self.assertEqual(options, self.default_options) def testExtensonConfigOptionAsJSON(self): config = { 'markdown.extensions.wikilinks': { 'base_url': 'http://example.com/', 'end_url': '.html', 'html_class': 'test', }, 'markdown.extensions.footnotes:FootnotesExtension': { 'PLACE_MARKER': '~~~footnotes~~~' } } import json self.create_config_file(json.dumps(config)) options, logging_level = parse_options(['-c', self.tempfile]) self.default_options['extension_configs'] = config self.assertEqual(options, self.default_options) def testExtensonConfigOptionMissingFile(self): self.assertRaises(IOError, parse_options, ['-c', 'missing_file.yaml']) def testExtensonConfigOptionBadFormat(self): config = """ [footnotes] PLACE_MARKER= ~~~footnotes~~~ """ self.create_config_file(config) self.assertRaises(yaml.YAMLError, parse_options, ['-c', self.tempfile]) class TestEscapeAppend(unittest.TestCase): """ Tests escape character append. """ def testAppend(self): """ Test that appended escapes are only in the current instance. """ md = markdown.Markdown() md.ESCAPED_CHARS.append('|') self.assertEqual('|' in md.ESCAPED_CHARS, True) md2 = markdown.Markdown() self.assertEqual('|' not in md2.ESCAPED_CHARS, True) Markdown-2.6.9/tests/test_extensions.py0000644000076500000240000010323413064117426020711 0ustar waylanstaff00000000000000""" Python-Markdown Extension Regression Tests ========================================== A collection of regression tests to confirm that the included extensions continue to work as advertised. This used to be accomplished by doctests. """ from __future__ import unicode_literals import unittest import markdown class TestCaseWithAssertStartsWith(unittest.TestCase): def assertStartsWith(self, expectedPrefix, text, msg=None): if not text.startswith(expectedPrefix): if len(expectedPrefix) + 5 < len(text): text = text[:len(expectedPrefix) + 5] + '...' standardMsg = '%s not found at the start of %s' % (repr(expectedPrefix), repr(text)) self.fail(self._formatMessage(msg, standardMsg)) class TestExtensionClass(unittest.TestCase): """ Test markdown.extensions.Extension. """ def setUp(self): class TestExtension(markdown.extensions.Extension): config = { 'foo': ['bar', 'Description of foo'], 'bar': ['baz', 'Description of bar'] } self.ext = TestExtension() self.ExtKlass = TestExtension def testGetConfig(self): self.assertEqual(self.ext.getConfig('foo'), 'bar') def testGetConfigDefault(self): self.assertEqual(self.ext.getConfig('baz'), '') self.assertEqual(self.ext.getConfig('baz', default='missing'), 'missing') def testGetConfigs(self): self.assertEqual(self.ext.getConfigs(), {'foo': 'bar', 'bar': 'baz'}) def testGetConfigInfo(self): self.assertEqual( dict(self.ext.getConfigInfo()), dict([ ('foo', 'Description of foo'), ('bar', 'Description of bar') ]) ) def testSetConfig(self): self.ext.setConfig('foo', 'baz') self.assertEqual(self.ext.getConfigs(), {'foo': 'baz', 'bar': 'baz'}) def testSetConfigWithBadKey(self): # self.ext.setConfig('bad', 'baz) ==> KeyError self.assertRaises(KeyError, self.ext.setConfig, 'bad', 'baz') def testConfigAsKwargsOnInit(self): ext = self.ExtKlass(foo='baz', bar='blah') self.assertEqual(ext.getConfigs(), {'foo': 'baz', 'bar': 'blah'}) class TestAbbr(unittest.TestCase): """ Test abbr extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.abbr']) def testSimpleAbbr(self): """ Test Abbreviations. """ text = 'Some text with an ABBR and a REF. Ignore REFERENCE and ref.' + \ '\n\n*[ABBR]: Abbreviation\n' + \ '*[REF]: Abbreviation Reference' self.assertEqual( self.md.convert(text), '

    Some text with an ABBR ' 'and a REF. Ignore ' 'REFERENCE and ref.

    ' ) def testNestedAbbr(self): """ Test Nested Abbreviations. """ text = '[ABBR](/foo) and _ABBR_\n\n' + \ '*[ABBR]: Abreviation' self.assertEqual( self.md.convert(text), '

    ABBR ' 'and ABBR

    ' ) class TestCodeHilite(TestCaseWithAssertStartsWith): """ Test codehilite extension. """ def setUp(self): self.has_pygments = True try: import pygments # noqa except ImportError: self.has_pygments = False def testBasicCodeHilite(self): text = '\t# A Code Comment' md = markdown.Markdown(extensions=['markdown.extensions.codehilite']) if self.has_pygments: # Pygments can use random lexer here as we did not specify the language self.assertStartsWith('
    ', md.convert(text))
            else:
                self.assertEqual(
                    md.convert(text),
                    '
    # A Code Comment'
                    '
    ' ) def testLinenumsTrue(self): text = '\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=True)]) if self.has_pygments: # Different versions of pygments output slightly different markup. # So we use 'startwith' and test just enough to confirm that # pygments received and processed linenums. self.assertStartsWith( '
    ', md.convert(text) ) else: self.assertEqual( md.convert(text), '
    # A Code Comment'
                    '
    ' ) def testLinenumsFalse(self): text = '\t#!Python\n\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=False)]) if self.has_pygments: self.assertStartsWith('
    # A Code Comment'
                    '
    ' ) def testLinenumsNone(self): text = '\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)]) if self.has_pygments: # Pygments can use random lexer here as we did not specify the language self.assertStartsWith('
    ', md.convert(text))
            else:
                self.assertEqual(
                    md.convert(text),
                    '
    # A Code Comment'
                    '
    ' ) def testLinenumsNoneWithShebang(self): text = '\t#!Python\n\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)]) if self.has_pygments: # Differant versions of pygments output slightly different markup. # So we use 'startwith' and test just enough to confirm that # pygments received and processed linenums. self.assertStartsWith( '
    ', md.convert(text) ) else: self.assertEqual( md.convert(text), '
    # A Code Comment'
                    '
    ' ) def testLinenumsNoneWithColon(self): text = '\t:::Python\n\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)] ) if self.has_pygments: self.assertStartsWith('
    # A Code Comment'
                    '
    ' ) def testHighlightLinesWithColon(self): # Test with hl_lines delimited by single or double quotes. text0 = '\t:::Python hl_lines="1"\n\t#line 1\n\t#line 2\n\t#line 3' text1 = "\t:::Python hl_lines='1'\n\t#line 1\n\t#line 2\n\t#line 3" for text in (text0, text1): md = markdown.Markdown(extensions=['markdown.extensions.codehilite']) if self.has_pygments: self.assertStartsWith( '
    ', '')
                    )
                else:
                    self.assertEqual(
                        md.convert(text),
                        '
    '
                        '#line 1\n'
                        '#line 2\n'
                        '#line 3
    ' ) def testUsePygmentsFalse(self): text = '\t:::Python\n\t# A Code Comment' md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(use_pygments=False)] ) self.assertEqual( md.convert(text), '
    # A Code Comment'
                '
    ' ) class TestFencedCode(TestCaseWithAssertStartsWith): """ Test fenced_code extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.fenced_code']) self.has_pygments = True try: import pygments # noqa except ImportError: self.has_pygments = False def testBasicFence(self): """ Test Fenced Code Blocks. """ text = ''' A paragraph before a fenced code block: ~~~ Fenced code block ~~~''' self.assertEqual( self.md.convert(text), '

    A paragraph before a fenced code block:

    \n' '
    Fenced code block\n'
                '
    ' ) def testSafeFence(self): """ Test Fenced Code with safe_mode. """ text = '~~~\nCode\n~~~' self.md.safeMode = 'replace' self.assertEqual( self.md.convert(text), '
    Code\n'
                '
    ' ) def testNestedFence(self): """ Test nested fence. """ text = ''' ~~~~~~~~ ~~~~ ~~~~~~~~''' self.assertEqual( self.md.convert(text), '
    \n'
                '~~~~\n'
                '
    ' ) def testFencedLanguage(self): """ Test Language Tags. """ text = ''' ~~~~{.python} # Some python code ~~~~''' self.assertEqual( self.md.convert(text), '
    # Some python code\n'
                '
    ' ) def testFencedBackticks(self): """ Test Code Fenced with Backticks. """ text = ''' ````` # Arbitrary code ~~~~~ # these tildes will not close the block `````''' self.assertEqual( self.md.convert(text), '
    # Arbitrary code\n'
                '~~~~~ # these tildes will not close the block\n'
                '
    ' ) def testFencedCodeWithHighlightLines(self): """ Test Fenced Code with Highlighted Lines. """ text = ''' ```hl_lines="1 3" line 1 line 2 line 3 ```''' md = markdown.Markdown( extensions=[ markdown.extensions.codehilite.CodeHiliteExtension(linenums=None, guess_lang=False), 'markdown.extensions.fenced_code' ] ) if self.has_pygments: self.assertStartsWith( '
    ', '')
                )
            else:
                self.assertEqual(
                    md.convert(text),
                    '
    line 1\n'
                    'line 2\n'
                    'line 3
    ' ) def testFencedLanguageAndHighlightLines(self): """ Test Fenced Code with Highlighted Lines. """ text0 = ''' ```.python hl_lines="1 3" #line 1 #line 2 #line 3 ```''' text1 = ''' ~~~{.python hl_lines='1 3'} #line 1 #line 2 #line 3 ~~~''' for text in (text0, text1): md = markdown.Markdown( extensions=[ markdown.extensions.codehilite.CodeHiliteExtension(linenums=None, guess_lang=False), 'markdown.extensions.fenced_code' ] ) if self.has_pygments: self.assertStartsWith( '
    ', '')
                    )
                else:
                    self.assertEqual(
                        md.convert(text),
                        '
    #line 1\n'
                        '#line 2\n'
                        '#line 3
    ' ) def testFencedLanguageAndPygmentsDisabled(self): """ Test if fenced_code honors CodeHilite option use_pygments=False. """ text = '```python\nfrom __future__ import braces\n```' md = markdown.Markdown( extensions=[ markdown.extensions.codehilite.CodeHiliteExtension(use_pygments=False), 'markdown.extensions.fenced_code' ] ) self.assertTrue('' in md.convert(text)) class TestHeaderId(unittest.TestCase): """ Test HeaderId Extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.headerid']) def testBasicHeaderId(self): """ Test Basic HeaderID """ text = "# Some Header #" self.assertEqual( self.md.convert(text), '

    Some Header

    ' ) def testNoAutoIds(self): """ Test HeaderIDs with no auto generated IDs. """ text = '# Some Header\n# Another Header' self.assertEqual( markdown.markdown(text, [markdown.extensions.headerid.HeaderIdExtension(forceid=False)]), '

    Some Header

    \n' '

    Another Header

    ' ) def testHeaderIdWithMetaData(self): """ Test Header IDs with MetaData extension. """ text = '''header_level: 2 header_forceid: Off # A Header''' self.assertEqual( markdown.markdown(text, ['markdown.extensions.headerid', 'markdown.extensions.meta']), '

    A Header

    ' ) def testHeaderIdWithAttr_List(self): """ Test HeaderIDs with Attr_List extension. """ text = '# Header1 {: #foo }\n# Header2 {: .bar }' self.assertEqual( markdown.markdown(text, ['markdown.extensions.headerid', 'markdown.extensions.attr_list']), '

    Header1

    \n' '

    Header2

    ' ) # Switch order extensions are loaded - should be no change in behavior. self.assertEqual( markdown.markdown(text, ['markdown.extensions.attr_list', 'markdown.extensions.headerid']), '

    Header1

    \n' '

    Header2

    ' ) class TestMetaData(unittest.TestCase): """ Test MetaData extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.meta']) def testBasicMetaData(self): """ Test basic metadata. """ text = '''Title: A Test Doc. Author: Waylan Limberg John Doe Blank_Data: The body. This is paragraph one.''' self.assertEqual( self.md.convert(text), '

    The body. This is paragraph one.

    ' ) self.assertEqual( self.md.Meta, { 'author': ['Waylan Limberg', 'John Doe'], 'blank_data': [''], 'title': ['A Test Doc.'] } ) def testYamlMetaData(self): """ Test metadata specified as simple YAML. """ text = '''--- Title: A Test Doc. Author: [Waylan Limberg, John Doe] Blank_Data: --- The body. This is paragraph one.''' self.assertEqual( self.md.convert(text), '

    The body. This is paragraph one.

    ' ) self.assertEqual( self.md.Meta, { 'author': ['[Waylan Limberg, John Doe]'], 'blank_data': [''], 'title': ['A Test Doc.'] } ) def testMissingMetaData(self): """ Test document without Meta Data. """ text = ' Some Code - not extra lines of meta data.' self.assertEqual( self.md.convert(text), '
    Some Code - not extra lines of meta data.\n'
                '
    ' ) self.assertEqual(self.md.Meta, {}) def testMetaDataWithoutNewline(self): """ Test doocument with only metadata and no newline at end.""" text = 'title: No newline' self.assertEqual(self.md.convert(text), '') self.assertEqual(self.md.Meta, {'title': ['No newline']}) class TestWikiLinks(unittest.TestCase): """ Test Wikilinks Extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.wikilinks']) self.text = "Some text with a [[WikiLink]]." def testBasicWikilinks(self): """ Test [[wikilinks]]. """ self.assertEqual( self.md.convert(self.text), '

    Some text with a ' 'WikiLink.

    ' ) def testWikilinkWhitespace(self): """ Test whitespace in wikilinks. """ self.assertEqual( self.md.convert('[[ foo bar_baz ]]'), '

    foo bar_baz

    ' ) self.assertEqual( self.md.convert('foo [[ ]] bar'), '

    foo bar

    ' ) def testSimpleSettings(self): """ Test Simple Settings. """ self.assertEqual(markdown.markdown( self.text, [ markdown.extensions.wikilinks.WikiLinkExtension( base_url='/wiki/', end_url='.html', html_class='foo') ] ), '

    Some text with a ' 'WikiLink.

    ') def testComplexSettings(self): """ Test Complex Settings. """ md = markdown.Markdown( extensions=['markdown.extensions.wikilinks'], extension_configs={ 'markdown.extensions.wikilinks': [ ('base_url', 'http://example.com/'), ('end_url', '.html'), ('html_class', '') ] }, safe_mode=True ) self.assertEqual( md.convert(self.text), '

    Some text with a ' 'WikiLink.

    ' ) def testWikilinksMetaData(self): """ test MetaData with Wikilinks Extension. """ text = """wiki_base_url: http://example.com/ wiki_end_url: .html wiki_html_class: Some text with a [[WikiLink]].""" md = markdown.Markdown(extensions=['markdown.extensions.meta', 'markdown.extensions.wikilinks']) self.assertEqual( md.convert(text), '

    Some text with a ' 'WikiLink.

    ' ) # MetaData should not carry over to next document: self.assertEqual( md.convert("No [[MetaData]] here."), '

    No MetaData ' 'here.

    ' ) def testURLCallback(self): """ Test used of a custom URL builder. """ from markdown.extensions.wikilinks import WikiLinkExtension def my_url_builder(label, base, end): return '/bar/' md = markdown.Markdown(extensions=[WikiLinkExtension(build_url=my_url_builder)]) self.assertEqual( md.convert('[[foo]]'), '

    foo

    ' ) class TestAdmonition(unittest.TestCase): """ Test Admonition Extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.admonition']) def testRE(self): RE = self.md.parser.blockprocessors['admonition'].RE tests = [ ('!!! note', ('note', None)), ('!!! note "Please Note"', ('note', 'Please Note')), ('!!! note ""', ('note', '')), ] for test, expected in tests: self.assertEqual(RE.match(test).groups(), expected) class TestTOC(TestCaseWithAssertStartsWith): """ Test TOC Extension. """ def setUp(self): self.md = markdown.Markdown(extensions=['markdown.extensions.toc']) def testMarker(self): """ Test TOC with a Marker. """ text = '[TOC]\n\n# Header 1\n\n## Header 2' self.assertEqual( self.md.convert(text), '
    \n' '
      \n' # noqa '
    • Header 1' # noqa '\n' # noqa '
    • \n' # noqa '
    \n' # noqa '
    \n' '

    Header 1

    \n' '

    Header 2

    ' ) def testNoMarker(self): """ Test TOC without a Marker. """ text = '# Header 1\n\n## Header 2' self.assertEqual( self.md.convert(text), '

    Header 1

    \n' '

    Header 2

    ' ) self.assertEqual( self.md.toc, '
    \n' '
      \n' # noqa '
    • Header 1' # noqa '\n' # noqa '
    • \n' # noqa '
    \n' # noqa '
    \n' ) def testAlternateMarker(self): """ Test TOC with user defined marker. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(marker='{{marker}}')] ) text = '{{marker}}\n\n# Header 1\n\n## Header 2' self.assertEqual( md.convert(text), '
    \n' '
      \n' # noqa '
    • Header 1' # noqa '\n' # noqa '
    • \n' # noqa '
    \n' # noqa '
    \n' '

    Header 1

    \n' '

    Header 2

    ' ) def testDisabledMarker(self): """ Test TOC with disabled marker. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(marker='')] ) text = '[TOC]\n\n# Header 1\n\n## Header 2' self.assertEqual( md.convert(text), '

    [TOC]

    \n' '

    Header 1

    \n' '

    Header 2

    ' ) self.assertStartsWith('
    ', md.toc) def testReset(self): """ Test TOC Reset. """ self.assertEqual(self.md.toc, '') self.md.convert('# Header 1\n\n## Header 2') self.assertStartsWith('
    ', self.md.toc) self.md.reset() self.assertEqual(self.md.toc, '') def testUniqueIds(self): """ Test Unique IDs. """ text = '#Header\n#Header\n#Header' self.assertEqual( self.md.convert(text), '

    Header

    \n' '

    Header

    \n' '

    Header

    ' ) def testHtmlEntities(self): """ Test Headers with HTML Entities. """ text = '# Foo & bar' self.assertEqual( self.md.convert(text), '

    Foo & bar

    ' ) def testRawHtml(self): """ Test Headers with raw HTML. """ text = '# Foo Bar Baz.' self.assertEqual( self.md.convert(text), '

    Foo Bar Baz.

    ' ) def testBaseLevel(self): """ Test Header Base Level. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(baselevel=5)] ) text = '# Some Header\n\n## Next Level\n\n### Too High' self.assertEqual( md.convert(text), '
    Some Header
    \n' '
    Next Level
    \n' '
    Too High
    ' ) self.assertEqual( md.toc, '
    \n' '\n' # noqa '
    \n' ) def testHeaderInlineMarkup(self): """ Test Headers with inline markup. """ text = '#Some *Header* with [markup](http://example.com).' self.assertEqual( self.md.convert(text), '

    Some Header with ' 'markup.

    ' ) def testAnchorLink(self): """ Test TOC Anchorlink. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)] ) text = '# Header 1\n\n## Header *2*' self.assertEqual( md.convert(text), '

    Header 1

    \n' '

    Header 2

    ' ) def testAnchorLinkWithSingleInlineCode(self): """ Test TOC Anchorlink with single inline code. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)] ) text = '# This is `code`.' self.assertEqual( md.convert(text), '

    ' # noqa '' # noqa 'This is code.' # noqa '' # noqa '

    ' # noqa ) def testAnchorLinkWithDoubleInlineCode(self): """ Test TOC Anchorlink with double inline code. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(anchorlink=True)] ) text = '# This is `code` and `this` too.' self.assertEqual( md.convert(text), '

    ' # noqa '' # noqa 'This is code and this too.' # noqa '' # noqa '

    ' # noqa ) def testPermalink(self): """ Test TOC Permalink. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(permalink=True)] ) text = '# Header' self.assertEqual( md.convert(text), '

    ' # noqa 'Header' # noqa '' # noqa '

    ' # noqa ) def testPermalinkWithSingleInlineCode(self): """ Test TOC Permalink with single inline code. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(permalink=True)] ) text = '# This is `code`.' self.assertEqual( md.convert(text), '

    ' # noqa 'This is code.' # noqa '' # noqa '

    ' # noqa ) def testPermalinkWithDoubleInlineCode(self): """ Test TOC Permalink with double inline code. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(permalink=True)] ) text = '# This is `code` and `this` too.' self.assertEqual( md.convert(text), '

    ' # noqa 'This is code and this too.' # noqa '' # noqa '

    ' # noqa ) def testTitle(self): """ Test TOC Title. """ md = markdown.Markdown( extensions=[markdown.extensions.toc.TocExtension(title='Table of Contents')] ) md.convert('# Header 1\n\n## Header 2') self.assertStartsWith( '
    Table of Contents
      ', md.toc ) def testWithAttrList(self): """ Test TOC with attr_list Extension. """ md = markdown.Markdown(extensions=['markdown.extensions.toc', 'markdown.extensions.attr_list']) text = '# Header 1\n\n## Header 2 { #foo }' self.assertEqual( md.convert(text), '

      Header 1

      \n' '

      Header 2

      ' ) self.assertEqual( md.toc, '
      \n' '
        \n' # noqa '
      • Header 1' # noqa '\n' # noqa '
      • \n' # noqa '
      \n' # noqa '
      \n' ) def testUniqueFunc(self): """ Test 'unique' function. """ from markdown.extensions.toc import unique ids = set(['foo']) self.assertEqual(unique('foo', ids), 'foo_1') self.assertEqual(ids, set(['foo', 'foo_1'])) class TestSmarty(unittest.TestCase): def setUp(self): config = { 'markdown.extensions.smarty': [ ('smart_angled_quotes', True), ('substitutions', { 'ndash': '\u2013', 'mdash': '\u2014', 'ellipsis': '\u2026', 'left-single-quote': '‚', # sb is not a typo! 'right-single-quote': '‘', 'left-double-quote': '„', 'right-double-quote': '“', 'left-angle-quote': '[', 'right-angle-quote': ']', }), ] } self.md = markdown.Markdown( extensions=['markdown.extensions.smarty'], extension_configs=config ) def testCustomSubstitutions(self): text = """<< The "Unicode char of the year 2014" is the 'mdash': --- Must not be confused with 'ndash' (--) ... >> """ correct = """

      [ The „Unicode char of the year 2014“ is the ‚mdash‘: \u2014 Must not be confused with ‚ndash‘ (\u2013) \u2026 ]

      """ self.assertEqual(self.md.convert(text), correct) class TestFootnotes(unittest.TestCase): """ Test Footnotes extension. """ def testBacklinkText(self): md = markdown.Markdown( extensions=['markdown.extensions.footnotes'], extension_configs={'markdown.extensions.footnotes': {'BACKLINK_TEXT': 'back'}} ) text = 'paragraph[^1]\n\n[^1]: A Footnote' self.assertEqual( md.convert(text), '

      paragraph1

      \n' '
      \n' '
      \n' '
        \n' '
      1. \n' '

        A Footnote back

        \n' '
      2. \n' '
      \n' '
      ' ) Markdown-2.6.9/tox.ini0000644000076500000240000000072413064117426015252 0ustar waylanstaff00000000000000[tox] envlist = py27, py32, py33, py34, pypy, flake8, checkspelling [testenv] deps = -rtest-requirements.txt commands = coverage run --source=markdown {toxinidir}/run-tests.py {posargs} coverage report --show-missing [testenv:flake8] deps = flake8 commands = flake8 {toxinidir}/markdown {toxinidir}/tests {toxinidir}/setup.py {toxinidir}/run-tests.py [testenv:checkspelling] deps = commands = {toxinidir}/checkspelling.sh [flake8] max-line-length = 119