~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/util.py

  • Committer: Holger Rapp
  • Date: 2010-01-01 20:08:18 UTC
  • mto: (173.3.2 widelands)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: rapp@mrt.uka.de-20100101200818-znihhmyhlx0o33gp
Added diff_match_patch from google, because they do not provide a setup.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
    text = user.username + " wrote:\n" + text
174
174
 
175
175
    # if markup == 'markdown':
176
 
    if markup == 'markdown':
 
176
    if markup:
177
177
        return '>'+text.replace('\n','\n>').replace('\r','\n>') + '\n'
178
 
    elif markup == 'bbcode':
179
 
        return '[quote]\n%s\n[/quote]\n' % text
180
178
    else:
181
179
        return text
 
180
    # elif markup == 'bbcode':
 
181
    #     return '[quote]\n%s\n[/quote]\n' % text
 
182
    # else:
 
183
        # return text
182
184
 
183
185
 
184
186
def absolute_url(path):