From 4b7c0eb2e64ba9ac910dd57c545c2a455077632b Mon Sep 17 00:00:00 2001
From: Bernie Innocenti
Date: Fri, 24 Apr 2009 17:29:12 +0900
Subject: [PATCH] Restore compatibility with Python 2.6
---
geekigeeki.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/geekigeeki.py b/geekigeeki.py
index d208bb7..fbf3d93 100755
--- a/geekigeeki.py
+++ b/geekigeeki.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3.0
+#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 1999, 2000 Martin Pool
@@ -552,7 +552,8 @@ class WikiFormatter:
tr_re = re.compile(r"^\s*\|\|")
eol_re = re.compile(r"\r?\n")
# For each line, we scan through looking for magic strings, outputting verbatim any intervening text
- for self.line in eol_re.split(str(self.raw.expandtabs(), 'utf-8')):
+ #3.0: for self.line in eol_re.split(str(self.raw.expandtabs(), 'utf-8')):
+ for self.line in eol_re.split(str(self.raw.expandtabs())):
# Skip pragmas
if self.in_header:
if self.line.startswith('#'):
@@ -570,7 +571,8 @@ class WikiFormatter:
print('
')
else:
indent = indent_re.match(self.line)
- print(self._indent_to(len(indent.group(0))), end=' ')
+ #3.0: print(self._indent_to(len(indent.group(0))), end=' ')
+ print(self._indent_to(len(indent.group(0))))
print(re.sub(scan_re, self.replace, self.line))
if self.in_pre: print('')
--
2.25.1