From: Bernie Innocenti Date: Fri, 19 Mar 2010 13:12:37 +0000 (-0400) Subject: Merge commit 'giskard/master' X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=fe9e24ac252d4e400fd800102451ff165bd179b3;hp=-c;p=geekigeeki.git Merge commit 'giskard/master' --- fe9e24ac252d4e400fd800102451ff165bd179b3 diff --combined geekigeeki.py index 3ae59e0,a5ba6a2..4941186 --- a/geekigeeki.py +++ b/geekigeeki.py @@@ -25,7 -25,7 +25,7 @@@ video_ext = "ogg|ogv|oga" # Not support 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"\.([^\./]+)$") @@@ -556,8 -556,8 +556,8 @@@ class WikiFormatter | (?P --) # Links - | (?P \<\<([^\s\|\>]+)(?:\s*\|\s*([^\>]+)|)\>\>) - | (?P \[\[([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\]\]) + | (?P \<\<[^\>]+\>\>) + | (?P \[\[[^\]]+\]\]) # Inline HTML | (?P <(br|hr|div|span|form|iframe|input|textarea|a|img|h[1-5])\b ) @@@ -573,7 -573,7 +573,7 @@@ # Lists, divs, spans and inline objects | (?P
  • ^\s+[\*\#]\s+) | (?P
       \{\{\{|\s*\}\}\})
     -            | (?P   \{\{([^\s\|]+)(?:\s*\|\s*([^\]]+)|)\}\})
     +            | (?P   \{\{[^\}]+\}\})
      
                  # Tables
                  | (?P    ^\s*\|\|(=|)\s*)
    @@@ -667,16 -667,17 +667,17 @@@ class Page
                  pathname = (pathname and pathname + '/' ) + dirname
                  out += '[[' + pathname + '|' + dirname + ']]/'
              out += ' ==\n'
    +         images_out = '\n'
       
              for filename in page_list(self._filename(), file_re):
                  if image_re.match(filename):
                      maxwidth = config_get('image_maxwidth', '400')
                      if maxwidth:
                          maxwidth = ' | maxwidth=' + str(maxwidth)
    -                 out += '{{' + self.page_name + '/' + filename + ' | ' + humanlink(filename) + maxwidth + ' | class=thumbleft}}\n'
    +                 images_out += '{{' + self.page_name + '/' + filename + ' | ' + humanlink(filename) + maxwidth + ' | class=thumbleft}}\n'
                  else:
                      out += ' * [[' + self.page_name + '/' + filename + ']]\n'
    -         return out
    +         return out + images_out
      
          def pragmas(self):
              if not '_pragmas' in self.__dict__: