aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2010-07-07 13:02:53 -0400
committerWaylan Limberg <waylan@gmail.com>2010-07-07 13:02:53 -0400
commita4229ae1cd9370903f5795b9980d3c95cbe05283 (patch)
tree742375b0fcb217e754887b43153f2ffc75d8e53b
parent93fac97c0974c00e3c5ff8d277ad216e343792e0 (diff)
downloadmarkdown-a4229ae1cd9370903f5795b9980d3c95cbe05283.tar.gz
markdown-a4229ae1cd9370903f5795b9980d3c95cbe05283.tar.bz2
markdown-a4229ae1cd9370903f5795b9980d3c95cbe05283.zip
Cleaned up the comments in markdown/__init__.py after the refactor.
-rw-r--r--markdown/__init__.py47
1 files changed, 14 insertions, 33 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 4881587..cbf3898 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -8,16 +8,7 @@ called from the command line.
## Basic usage as a module:
import markdown
- md = Markdown()
- html = md.convert(your_text_string)
-
-## Basic use from the command line:
-
- markdown source.txt > destination.html
-
-Run "markdown --help" to see more options.
-
-## Extensions
+ html = markdown.markdown(your_text_string)
See <http://www.freewisdom.org/projects/python-markdown/> for more
information and instructions on how to extend the functionality of
@@ -36,7 +27,7 @@ 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).
+License: BSD (see LICENSE for details).
"""
version = "2.0.3"
@@ -44,28 +35,6 @@ version_info = (2,0,3, "Final")
import re
import codecs
-
-"""
-OVERALL DESIGN
-=============================================================================
-
-Markdown processing takes place in four steps:
-
-1. A bunch of "preprocessors" munge the input text.
-2. BlockParser() parses the high-level structural elements of the
- pre-processed text into an ElementTree.
-3. A bunch of "treeprocessors" are run against the ElementTree. One such
- treeprocessor runs InlinePatterns against the ElementTree, detecting inline
- markup.
-4. Some post-processors are run against the text after the ElementTree has
- been serialized into text.
-5. The output is written to a string.
-
-Those steps are put together by the Markdown() class.
-
-"""
-
-
from logging import DEBUG, INFO, WARN, ERROR, CRITICAL
from md_logging import message
import util
@@ -210,6 +179,18 @@ class Markdown:
* source: Source text as a Unicode string.
+ Markdown processing takes place in five steps:
+
+ 1. A bunch of "preprocessors" munge the input text.
+ 2. BlockParser() parses the high-level structural elements of the
+ pre-processed text into an ElementTree.
+ 3. A bunch of "treeprocessors" are run against the ElementTree. One
+ such treeprocessor runs InlinePatterns against the ElementTree,
+ detecting inline markup.
+ 4. Some post-processors are run against the text after the ElementTree
+ has been serialized into text.
+ 5. The output is written to a string.
+
"""
# Fixup the source text