aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/blockprocessors.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-27 09:10:47 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-27 09:10:47 -0500
commit579288c5eb684dd09d1ef298929a566f40151205 (patch)
treed10a50f91b8606cd1dea38764168abab92958b0f /markdown/blockprocessors.py
parentb37ab16ba56ac6fe4e64f87521996bad323058f2 (diff)
downloadmarkdown-579288c5eb684dd09d1ef298929a566f40151205.tar.gz
markdown-579288c5eb684dd09d1ef298929a566f40151205.tar.bz2
markdown-579288c5eb684dd09d1ef298929a566f40151205.zip
Now using universal code for Python 2 & 3.
The most notable changes are the use of unicode_literals and absolute_imports. Actually, absolute_imports was the biggest deal as it gives us relative imports. For the first time extensions import markdown relative to themselves. This allows other packages to embed the markdown lib in a subdir of their project and still be able to use our extensions.
Diffstat (limited to 'markdown/blockprocessors.py')
-rw-r--r--markdown/blockprocessors.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py
index 8b41a37..a681d6c 100644
--- a/markdown/blockprocessors.py
+++ b/markdown/blockprocessors.py
@@ -1,21 +1,21 @@
-"""
-CORE MARKDOWN BLOCKPARSER
-=============================================================================
-
-This parser handles basic parsing of Markdown blocks. It doesn't concern itself
-with inline elements such as **bold** or *italics*, but rather just catches
-blocks, lists, quotes, etc.
-
-The BlockParser is made up of a bunch of BlockProssors, each handling a
-different type of block. Extensions may add/replace/remove BlockProcessors
-as they need to alter how markdown blocks are parsed.
-
-"""
-
+from __future__ import unicode_literals
+# CORE MARKDOWN BLOCKPARSER
+# ===========================================================================
+#
+# This parser handles basic parsing of Markdown blocks. It doesn't concern itself
+# with inline elements such as **bold** or *italics*, but rather just catches
+# blocks, lists, quotes, etc.
+#
+# The BlockParser is made up of a bunch of BlockProssors, each handling a
+# different type of block. Extensions may add/replace/remove BlockProcessors
+# as they need to alter how markdown blocks are parsed.
+
+from __future__ import absolute_import
+from __future__ import division
import logging
import re
-import util
-from blockparser import BlockParser
+from . import util
+from .blockparser import BlockParser
logger = logging.getLogger('MARKDOWN')