Hatta File Tree Branch

changeset 694:ff4c665a0009

Fix a few regressions
author Ben
date Sat Dec 12 02:05:14 2009 +0100 (2009-12-12)
parents 146cf75290b5
children 9c8347beb368
files hatta.py
line diff
     1.1 --- a/hatta.py	Sun Dec 20 11:05:41 2009 +0100
     1.2 +++ b/hatta.py	Sat Dec 12 02:05:14 2009 +0100
     1.3 @@ -688,7 +688,7 @@
     1.4                  ur"*[}]*)[}][}][}]"),
     1.5          "free_link": (30, ur"""(http|https|ftp)://\S+[^\s.,:;!?()'"=+<>-]"""),
     1.6          "italic": (40 , ur"//"),
     1.7 -        "link": (50, ur"\[\[(?P<link_target>([^|\]]|\][^|\]])+)"
     1.8 +        "link": (50, ur"\[\[(?P<link_target>([^|\]]|\][^|\]])+?)\s*"
     1.9                  ur"(\|(?P<link_text>([^\]]|\][^\]])+))?\]\]"),
    1.10          "image": (60, image_pat),
    1.11          "linebreak": (70, ur"\\\\"),
    1.12 @@ -1275,8 +1275,9 @@
    1.13                     '(SELECT * FROM titles WHERE target=title) '
    1.14                     'ORDER BY target;')
    1.15              for (title,) in con.execute(sql):
    1.16 -                if not external_link(title) and not title.startswith('+'):
    1.17 -                    yield title
    1.18 +                stitle = str(title)
    1.19 +                if not stitle.startswith('+'):
    1.20 +                    yield stitle
    1.21          finally:
    1.22              con.commit()
    1.23  
    1.24 @@ -1805,7 +1806,6 @@
    1.25                                     button, ' . . . . ', self.wiki_link(author),
    1.26                                     werkzeug.html.div(werkzeug.html(comment),
    1.27                                                       class_="comment"))
    1.28 -            yield history_item
    1.29          yield (u'</ul><input type="hidden" name="parent" value="%d"></form>'
    1.30                 % max_rev)
    1.31  
    1.32 @@ -2393,7 +2393,7 @@
    1.33          if request.form.get('preview'):
    1.34              text = request.form.get("text")
    1.35              if text is not None:
    1.36 -                lines = tlext.split('\n')
    1.37 +                lines = text.split('\n')
    1.38              else:
    1.39                  lines = [werkzeug.html.p(werkzeug.html(
    1.40                      _(u'No preview for binaries.')))]