Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

switch to a stub runner script for bin/markdown2

  • Loading branch information...
commit d14e1152e73521ac0908d9391385c55391b96646 1 parent b97e810
@trentm authored
Showing with 21 additions and 0 deletions.
  1. +3 −0  CHANGES.txt
  2. +18 −0 bin/markdown2
View
3  CHANGES.txt
@@ -2,6 +2,9 @@
## python-markdown2 v1.0.1.10 (not yet final)
+- "bin/markdown2" is now a stub runner script rather than a symlink to
+ "lib/markdown2.py". The symlink was a problem for sdist: tar makes it a
+ copy.
- Added 'xml' extra: passes *one-liner* XML processing instructions and
namespaced XML tags without wrapping in a <p> -- i.e. treats them as a HTML
block tag.
View
18 bin/markdown2
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import sys
+from os.path import join, dirname, exists
+
+# Use the local markdown2.py if we are in the source tree.
+source_tree_markdown2 = join(dirname(__file__), "..", "lib", "markdown2.py")
+if exists(source_tree_markdown2):
+ sys.path.insert(0, dirname(source_tree_markdown2))
+ try:
+ from markdown2 import main
+ finally:
+ del sys.path[0]
+else:
+ from markdown2 import main
+
+if __name__ == "__main__":
+ sys.exit( main(sys.argv) )
Please sign in to comment.
Something went wrong with that request. Please try again.