projects
/
geekigeeki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e6f345
)
allow spaces in filenames
author
Bernie Innocenti
<bernie@codewiz.org>
Sat, 13 Mar 2010 17:31:52 +0000
(12:31 -0500)
committer
Bernie Innocenti
<bernie@codewiz.org>
Sat, 13 Mar 2010 17:31:52 +0000
(12:31 -0500)
geekigeeki.py
patch
|
blob
|
history
diff --git
a/geekigeeki.py
b/geekigeeki.py
index 317e9ca64a78e50649a3a2549b64a9ba201bc07c..3afc3e8a3ea3ec7144264489597f4afed0aebdaa 100755
(executable)
--- a/
geekigeeki.py
+++ b/
geekigeeki.py
@@
-25,7
+25,7
@@
video_ext = "ogg|ogv|oga" # Not supported by Firefox 3.5: mkv|mpg|mpeg|mp4|avi|a
image_re = re.compile(r".*\.(" + image_ext + "|" + video_ext + ")$", re.IGNORECASE)
video_re = re.compile(r".*\.(" + video_ext + ")$", re.IGNORECASE)
# FIXME: we accept stuff like foo/../bar and we shouldn't
image_re = re.compile(r".*\.(" + image_ext + "|" + video_ext + ")$", re.IGNORECASE)
video_re = re.compile(r".*\.(" + video_ext + ")$", re.IGNORECASE)
# FIXME: we accept stuff like foo/../bar and we shouldn't
-file_re = re.compile(r"([A-Za-z0-9_\-][A-Za-z0-9_\.\-/]*)$")
+file_re = re.compile(r"([A-Za-z0-9_\-][A-Za-z0-9_\.\-/
]*)$")
url_re = re.compile(r"[a-z]{3,8}://[^\s'\"]+\S$")
ext_re = re.compile(r"\.([^\./]+)$")
url_re = re.compile(r"[a-z]{3,8}://[^\s'\"]+\S$")
ext_re = re.compile(r"\.([^\./]+)$")
@@
-556,8
+556,8
@@
class WikiFormatter:
| (?P<glyph> --)
# Links
| (?P<glyph> --)
# Links
- | (?P<macro> \<\<
([^\s\|\>]+)(?:\s*\|\s*([^\>]+)|)
\>\>)
- | (?P<hurl> \[\[
([^\s\|]+)(?:\s*\|\s*([^\]]+)|)
\]\])
+ | (?P<macro> \<\<
[^\>]+
\>\>)
+ | (?P<hurl> \[\[
[^\]]+
\]\])
# Inline HTML
| (?P<html> <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b )
# Inline HTML
| (?P<html> <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b )
@@
-573,7
+573,7
@@
class WikiFormatter:
# Lists, divs, spans and inline objects
| (?P<li> ^\s+[\*\#]\s+)
| (?P<pre> \{\{\{|\s*\}\}\})
# Lists, divs, spans and inline objects
| (?P<li> ^\s+[\*\#]\s+)
| (?P<pre> \{\{\{|\s*\}\}\})
- | (?P<inl> \{\{
([^\s\|]+)(?:\s*\|\s*([^\]]+)|)
\}\})
+ | (?P<inl> \{\{
[^\}]+
\}\})
# Tables
| (?P<tr> ^\s*\|\|(=|)\s*)
# Tables
| (?P<tr> ^\s*\|\|(=|)\s*)