Changeset 2

Show
Ignore:
Timestamp:
11/29/04 04:44:20 (4 years ago)
Author:
athomas
Message:

Made sure that comments are added only when [[AddComment]] is at the beginning of the line.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/macros/AddComment.py

    r1 r2  
    4040        newtext = StringIO() 
    4141        for line in page.text.splitlines(): 
    42             if line.find('[[AddComment') != -1
     42            if line.find('[[AddComment') == 0
    4343                newtext.write("==== Comment by %s on %s ====\n%s\n\n" % (authname, time.strftime('%c', time.localtime()), comment)) 
    4444            newtext.write(line + "\n")