X-Git-Url: https://codewiz.org/gitweb?p=geekigeeki.git;a=blobdiff_plain;f=geekigeeki.py;h=5340646c63101b24629d96a26ff2adea8e66a3b7;hp=a0345ee950f0c0fc750e874717dc9d5e34ddbad6;hb=61f00a0d333aeb1cb45e98ab4c1902ff1981ad6a;hpb=727c1cfdb0040ca5d95efb81c975d36d1f568c0b
diff --git a/geekigeeki.py b/geekigeeki.py
index a0345ee..5340646 100755
--- a/geekigeeki.py
+++ b/geekigeeki.py
@@ -1,8 +1,9 @@
-#! /usr/bin/env python
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
#
# Copyright 1999, 2000 Martin Pool ' + Page(page_name).link_to()
print ' . . . . ' + `count`
- print ['match', 'matches'][count <> 1]
+ print ['match', 'matches'][count != 1]
print ' %d hits out of %d pages searched.
'
- elif self.in_var:
- self.in_var = False
- return '
'
- return ''
+ return '' + word + ''
def _tr_repl(self, word):
out = ''
@@ -441,16 +446,17 @@ class PageFormatter:
self.tr_cnt = 0
out = '' + out = out + ' | |
', ' | '][word.strip() == '||='] - def _tre_repl(self, word): + def _td_repl(self, word): if self.in_table: - return ' | ', ' | '][word.strip() == '||='] return '' - def _td_repl(self, word): + def _tre_repl(self, word): if self.in_table: - return ' | ' + return [' | ', ''][word.strip() == '||='] return '' def _indent_level(self): @@ -492,8 +498,9 @@ class PageFormatter: scan_re = re.compile( r"(?:" # Formatting - + r"(?P
---|---|
\s*\|\|\s*)" + + r"|(?P | |
\s*\|\|(=|)\s*)"
+ r")")
pre_re = re.compile(
r"(?:"
+ r"(?P\s*\}\}\})" + + r"|(?P |