Home
last modified time | relevance | path

Searched refs:markdown (Results 1 – 25 of 76) sorted by relevance

1234

/external/markdown/markdown/
Dpostprocessors.py12 import markdown
17 self.markdown = markdown_instance
45 for i in range(self.markdown.htmlStash.html_counter):
46 html, safe = self.markdown.htmlStash.rawHtmlBlocks[i]
47 if self.markdown.safeMode and not safe:
48 if str(self.markdown.safeMode).lower() == 'escape':
50 elif str(self.markdown.safeMode).lower() == 'remove':
53 html = markdown.HTML_REMOVED_TEXT
54 if safe or not self.markdown.safeMode:
56 (markdown.preprocessors.HTML_PLACEHOLDER % i),
[all …]
Dinlinepatterns.py44 import markdown
71 if markdown.SMART_EMPHASIS:
134 self.markdown = markdown_instance
162 if text == markdown.INLINE_PLACEHOLDER_PREFIX:
177 el = markdown.etree.Element(self.tag)
185 return markdown.etree.Element(self.tag)
195 el = markdown.etree.Element(self.tag)
196 el.text = markdown.AtomicString(m.group(3).strip())
208 el1 = markdown.etree.Element(tag1)
209 el2 = markdown.etree.SubElement(el1, tag2)
[all …]
Dblockprocessors.py16 import markdown
44 if line.startswith(' '*markdown.TAB_LENGTH):
45 newtext.append(line[markdown.TAB_LENGTH:])
56 if lines[i].startswith(' '*markdown.TAB_LENGTH*level):
57 lines[i] = lines[i][markdown.TAB_LENGTH*level:]
116 INDENT_RE = re.compile(r'^(([ ]{%s})+)'% markdown.TAB_LENGTH)
121 return block.startswith(' '*markdown.TAB_LENGTH) and \
155 li = markdown.etree.SubElement(parent, 'li')
163 indent_level = len(m.group(1))/markdown.TAB_LENGTH
190 return block.startswith(' '*markdown.TAB_LENGTH)
[all …]
Dtreeprocessors.py1 import markdown
11 self.markdown = markdown_instance
40 self.__placeholder_prefix = markdown.INLINE_PLACEHOLDER_PREFIX
41 self.__placeholder_suffix = markdown.ETX
44 self.__placeholder_re = re.compile(markdown.INLINE_PLACEHOLDER % r'([0-9]{4})')
45 self.markdown = md
50 hash = markdown.INLINE_PLACEHOLDER % id
90 if not isinstance(data, markdown.AtomicString):
92 while patternIndex < len(self.markdown.inlinePatterns):
94 self.markdown.inlinePatterns.value_for_index(patternIndex),
[all …]
Dpreprocessors.py11 import markdown
13 HTML_PLACEHOLDER_PREFIX = markdown.STX+"wzxhzdk:"
14 HTML_PLACEHOLDER = HTML_PLACEHOLDER_PREFIX + "%d" + markdown.ETX
19 self.markdown = markdown_instance
138 and markdown.isBlockLevel(left_tag):
142 if not (markdown.isBlockLevel(left_tag) \
154 self.markdown.htmlStash.store(block.strip()))
159 if markdown.isBlockLevel(left_tag) or left_tag == "--" \
165 self.markdown.htmlStash.store(block.strip()))
180 self.markdown.htmlStash.store('\n\n'.join(items)))
[all …]
Dblockparser.py2 import markdown
45 self.blockprocessors = markdown.odict.OrderedDict()
59 self.root = markdown.etree.Element(markdown.DOC_TAG)
61 return markdown.etree.ElementTree(self.root)
/external/markdown/docs/
Dusing_as_module.txt10 To use markdown as a module:
12 import markdown
13 html = markdown.markdown(your_text_string)
18 Note that ``markdown()`` expects **Unicode** as input (although a simple ASCII
25 html = markdown.markdown(text, extensions)
38 import markdown
39 md = markdown.Markdown(
49 md = markdown.Markdown()
63 md = markdown.Markdown()
66 The markdown module also includes a shortcut function ``markdownFromFile`` that
[all …]
Dcommand_line.txt12 Generally, you may simply call the ``markdown`` file from the command
14 ``easy_install``), then the ``markdown`` script will have been copied to
25 Calling ``markdown`` from th ecommand line will call the wrapper batch file
26 ``markdown.bat`` in the "Scripts" directory created during install.
34 and see if it works. Just run ``markdown`` from the command line.
40 * If you are sure ``markdown`` is on your path, but it still isn't being
45 markdown text files will not likely be in that directory, so it is much more
46 convenient to have ``markdown`` on your path.
51 To use ``markdown`` from the command line, run it as
53 $ markdown input_file.txt
[all …]
DREADME10 [Python-Markdown]: http://freewisdom.org/projects/python-markdown
11 [Markdown]: http://daringfireball.net/projects/markdown/
12 [Features]: http://www.freewisdom.org/projects/python-markdown/Features
13 [Available Extensions]: http://www.freewisdom.org/projects/python-markdown/Available_Extensions
21 <http://freewisdom.org/projects/python-markdown>.
28 [mailing list]: http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss
29 [bug tracker]: http://www.freewisdom.org/projects/python-markdown/Tickets
/external/markdown/markdown/extensions/
Dabbr.py26 import markdown, re
27 from markdown import etree
32 class AbbrExtension(markdown.Extension):
40 class AbbrPreprocessor(markdown.preprocessors.Preprocessor):
55 self.markdown.inlinePatterns['abbr-%s'%abbr] = \
77 class AbbrPattern(markdown.inlinepatterns.Pattern):
81 markdown.inlinepatterns.Pattern.__init__(self, pattern)
Ddef_list.py22 import markdown, re
23 from markdown import etree
26 class DefListProcessor(markdown.blockprocessors.BlockProcessor):
76 class DefListIndentProcessor(markdown.blockprocessors.ListIndentProcessor):
84 dd = markdown.etree.SubElement(parent, 'dd')
89 class DefListExtension(markdown.Extension):
Dhtml_tidy.py31 import markdown
34 class TidyExtension(markdown.Extension):
52 class TidyProcessor(markdown.postprocessors.Postprocessor):
58 **self.markdown.tidy_options))
Dfootnotes.py26 import re, markdown
27 from markdown import etree
34 class FootnoteExtension(markdown.Extension):
77 self.footnotes = markdown.odict.OrderedDict()
147 class FootnotePreprocessor(markdown.preprocessors.Preprocessor):
255 class FootnotePattern(markdown.inlinepatterns.Pattern):
259 markdown.inlinepatterns.Pattern.__init__(self, pattern)
273 class FootnoteTreeprocessor(markdown.treeprocessors.Treeprocessor):
297 class FootnotePostprocessor(markdown.postprocessors.Postprocessor):
Dwikilinks.py81 import markdown
90 class WikiLinkExtension(markdown.Extension):
114 class WikiLinks(markdown.inlinepatterns.Pattern):
116 markdown.inlinepatterns.Pattern.__init__(self, pattern)
124 a = markdown.etree.Element('a')
Dmeta.py43 import markdown, re
49 class MetaExtension (markdown.Extension):
58 class MetaPreprocessor(markdown.preprocessors.Preprocessor):
81 self.markdown.Meta = meta
Dfenced_code.py63 import markdown, re
74 class FencedCodeExtension(markdown.Extension):
84 class FencedBlockPreprocessor(markdown.preprocessors.Preprocessor):
96 placeholder = self.markdown.htmlStash.store(code, safe=True)
Drss.py1 import markdown
2 from markdown import etree
44 class RssExtension (markdown.Extension):
61 class RssTreeProcessor(markdown.treeprocessors.Treeprocessor):
105 pholder = self.markdown.htmlStash.store(
/external/markdown/docs/extensions/
DRSS.txt7 An extension to Python-Markdown that outputs a markdown document as RSS. This
16 >>> import markdown
17 >>> text = "Some markdown document."
18 >>> rss = markdown.markdown(text, ['rss'])
33 >>> rss = markdown.markdown(text, extensions = \
DAbbreviations.txt18 [php]: http://www.michelf.com/projects/php-markdown/extra/#abbr
38 >>> import markdown
44 >>> html = markdown.markdown(text, ['abbr'])
48 >>> html = markdown.markdown(text, ['abbr', 'footnotes'])
53 markdown.py -x abbr source.txt > output.html
Dfootnotes.txt19 [PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/#footnotes
30 blockquotes and most any other markdown syntax. The additional line simply
47 markdown document (See how to configure this text below):
56 >>> html = markdown.markdown(text, ['footnotes'])
59 use any existing markdown syntax):
61 >>> html = markdown.markdown(text, ['footnotes(PLACE_MARKER=+++my marker+++)'])
DDefinition_Lists.txt18 [php]: http://www.michelf.com/projects/php-markdown/extra/#def-list
46 >>> html = markdown.markdown(text, ['def_list'])
50 >>> html = markdown.markdown(text, ['def_list', 'footnotes'])
55 markdown.py -x def_list source.txt > output.html
DHeaderId.txt8 elements (h1-h6) in markdown's output.
17 [PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/#header-id
60 within the hierarchy of your html templates. For example, the markdown text for
67 >>> html = markdown.markdown(text, ['headerid(level=3)'])
78 >>> html = markdown.markdown(text, ['headerid(forceid=False)'])
DWikiLinks.txt46 >>> html = markdown.markdown(text, ['wikilink'])
71 >>> html = markdown.markdown(text,
87 md = markdown.Markdown(
95 >>> html = markdown.markdown(text,
105 … python markdown.py -x wikilink(base_url=http://example.com/,end_url=.html,html_class=foo) src.txt
109 >>> md = markdown.Markdown(
/external/markdown/
Dregression-tests.py13 import markdown
20 self.md = markdown.Markdown()
39 self.parser = markdown.Markdown().parser
43 root = markdown.etree.Element("div")
46 self.assertEqual(markdown.etree.tostring(root), "<div><p>foo</p></div>")
52 self.assert_(isinstance(tree, markdown.etree.ElementTree))
53 self.assert_(markdown.etree.iselement(tree.getroot()))
54 self.assertEqual(markdown.etree.tostring(tree.getroot()),
62 self.state = markdown.blockparser.State()
99 self.stash = markdown.preprocessors.HtmlStash()
[all …]
/external/markdown/tests/misc/
Dem-around-links.txt3 - *[Python in Markdown](http://www.freewisdom.org/projects/python-markdown/) by some
5 - _[Python in Markdown](http://www.freewisdom.org/projects/python-markdown/) by some
7 - [_Python in Markdown_](http://www.freewisdom.org/projects/python-markdown/) by some
9 - [_Python in Markdown_](http://www.freewisdom.org/projects/python-markdown/) _by some
12 _[Python in Markdown](http://www.freewisdom.org/projects/python-markdown/) by some

1234