changeset 1577:c2457afd322d

cosmetic changes, mostly whitespace
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Sep 2006 22:58:53 +0200
parents 1219de921010
children f5f7f1b84851
files MoinMoin/Page.py MoinMoin/PageEditor.py MoinMoin/PageGraphicalEditor.py MoinMoin/wikiutil.py
diffstat 4 files changed, 99 insertions(+), 103 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Mon Sep 18 22:32:37 2006 +0200
+++ b/MoinMoin/Page.py	Mon Sep 18 22:58:53 2006 +0200
@@ -66,7 +66,7 @@
             self.output_mimetype = "text/html"
 
         self.output_charset = config.charset # correct for wiki pages
-        
+
         self._raw_body = None
         self._raw_body_modified = 0
         self.hilite_re = None
@@ -398,7 +398,7 @@
         @rtype: string
         @return: temporary filename (complete path + filename)
         """
-        rnd = random.randint(0,1000000000)
+        rnd = random.randint(0, 1000000000)
         tmpname = os.path.join(self.cfg.data_dir, '#%s.%d#' % (self.page_name_fs, rnd))
         return tmpname
 
@@ -823,7 +823,7 @@
                 file.close()
 
         return self._raw_body
-    
+
     def get_raw_body_str(self):
         """ Returns the raw markup from the page file, as a string.
 
@@ -831,7 +831,7 @@
         @return: raw page contents of this page
         """
         return self.get_raw_body().encode("utf-8")
-    
+
     def set_raw_body(self, body, modified=0):
         """ Set the raw body text (prevents loading from disk).
 
@@ -1063,7 +1063,7 @@
         self.formatter.setPage(self)
         if self.hilite_re:
             self.formatter.set_highlight_re(self.hilite_re)
-        
+
         # default is wiki markup
         pi_format = self.cfg.default_markup or "wiki"
         pi_formatargs = ''
@@ -1080,7 +1080,7 @@
         # check processing instructions
         while body and body[0] == '#':
             pi_lines += 1
-            
+
             # extract first line
             try:
                 line, body = body.split('\n', 1)
@@ -1104,7 +1104,7 @@
             # check the PIs
             if verb == "format":
                 # markup format
-                pi_format, pi_formatargs = (args+' ').split(' ',1)
+                pi_format, pi_formatargs = (args+' ').split(' ', 1)
                 pi_format = pi_format.lower()
                 pi_formatargs = pi_formatargs.strip()
             elif verb == "refresh":
@@ -1234,7 +1234,7 @@
 
                 title = self.split_title(request)
 
-                request.theme.send_title(title,  page=self, msg=msg,
+                request.theme.send_title(title, page=self, msg=msg,
                                     pagename=self.page_name, print_mode=print_mode,
                                     media=media, pi_refresh=pi_refresh,
                                     allow_doubleclick=1, trail=trail,
@@ -1256,7 +1256,7 @@
 
         # Load the parser
         Parser = wikiutil.searchAndImportPlugin(self.request.cfg, "parser", self.pi_format)
-            
+
         # start wiki content div
         request.write(self.formatter.startContent(content_id))
 
@@ -1381,7 +1381,7 @@
                         raise
                     request.log('page cache failed after creation')
                     self.format(parser)
-        
+
         request.clock.stop('send_page_content')
 
     def format(self, parser):
@@ -1389,17 +1389,17 @@
         parser.format(self.formatter)
 
     def execute(self, request, parser, code):
-        """ Write page content by executing cache code """            
+        """ Write page content by executing cache code """
         formatter = self.formatter
         request.clock.start("Page.execute")
         try:
             from MoinMoin.macro import Macro
-            macro_obj = Macro(parser)        
+            macro_obj = Macro(parser)
             # Fix __file__ when running from a zip package
             import MoinMoin
             if hasattr(MoinMoin, '__loader__'):
                 __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
-    
+
             try:
                 exec code
             except "CacheNeedsUpdate": # convert the exception
@@ -1413,7 +1413,7 @@
         attachmentsPath = self.getPagePath('attachments', check_create=0)
         if cache.needsUpdate(self._text_filename(), attachmentsPath):
             raise Exception('CacheNeedsUpdate')
-        
+
         import marshal
         try:
             return marshal.loads(cache.content())
@@ -1422,23 +1422,23 @@
             # See http://docs.python.org/lib/module-marshal.html
             raise Exception('CacheNeedsUpdate')
         except Exception, err:
-            request.log('fail to load "%s" cache: %s' % 
+            request.log('fail to load "%s" cache: %s' %
                         (self.page_name, str(err)))
             raise Exception('CacheNeedsUpdate')
 
     def makeCache(self, request, parser):
         """ Format content into code, update cache and return code """
-        import marshal        
+        import marshal
         from MoinMoin.formatter.text_python import Formatter
         formatter = Formatter(request, ["page"], self.formatter)
-        
+
         # Save request state while formatting page
         saved_current_lang = request.current_lang
         try:
             text = request.redirectedOutput(parser.format, formatter)
         finally:
             request.current_lang = saved_current_lang
-        
+
         src = formatter.assemble_code(text)
         code = compile(src.encode(config.charset),
                        self.page_name.encode(config.charset), 'exec')
@@ -1710,15 +1710,15 @@
 
         cache = caching.CacheEntry(self.request, self, 'conflict', scope='item')
         return cache.exists()
-    
+
     def setConflict(self, state):
         """ Sets the editing conflict flag.
         
         @param state: bool, true if there is a conflict.
         """
-        
         cache = caching.CacheEntry(self.request, self, 'conflict', scope='item')
         if state:
             cache.update("") # touch it!
         else:
             cache.remove()
+
--- a/MoinMoin/PageEditor.py	Mon Sep 18 22:32:37 2006 +0200
+++ b/MoinMoin/PageEditor.py	Mon Sep 18 22:58:53 2006 +0200
@@ -19,9 +19,9 @@
 
 
 # used for merging
-conflict_markers = ("\n---- /!\ '''Edit conflict - other version:''' ----\n",
-                    "\n---- /!\ '''Edit conflict - your version:''' ----\n",
-                    "\n---- /!\ '''End of edit conflict''' ----\n")
+conflict_markers = ("\n---- /!\\ '''Edit conflict - other version:''' ----\n",
+                    "\n---- /!\\ '''Edit conflict - your version:''' ----\n",
+                    "\n---- /!\\ '''End of edit conflict''' ----\n")
 
 
 #############################################################################
@@ -77,7 +77,6 @@
         @keyword uid_override: override user id and name (default None)
         """
         Page.__init__(self, request, page_name, **keywords)
-        
         self._ = request.getText
 
         self.do_revision_backup = keywords.get('do_revision_backup', 1)
@@ -98,13 +97,13 @@
 
         # Get current editor text
         savetext = self.get_raw_body()
-        
+
         # The original text from the revision the user was editing
         original_text = Page(self.request, self.page_name, rev=origrev).get_raw_body()
-        
+
         # The current revision someone else saved
         saved_text = Page(self.request, self.page_name).get_raw_body()
-        
+
         # And try to merge all into one with edit conflict separators
         verynewtext = diff3.text_merge(original_text, saved_text, savetext,
                                        allow_conflicts, *conflict_markers)
@@ -127,7 +126,7 @@
     }
 </script>
 ''' % _("Your changes are not saved!"))
-        
+
     def sendEditor(self, **kw):
         """
         Send the editor form page.
@@ -199,7 +198,7 @@
         lock_expire = _("Your edit lock on %(lock_page)s has expired!") % {'lock_page': lock_page}
         lock_mins = _("Your edit lock on %(lock_page)s will expire in # minutes.") % {'lock_page': lock_page}
         lock_secs = _("Your edit lock on %(lock_page)s will expire in # seconds.") % {'lock_page': lock_page}
-                
+
         # get request parameters
         try:
             text_rows = int(form['rows'][0])
@@ -211,7 +210,7 @@
         if preview is not None:
             # Propagate original revision
             rev = int(form['rev'][0])
-            
+
             # Check for editing conflicts
             if not self.exists():
                 # page does not exist, are we creating it?
@@ -221,12 +220,12 @@
                 conflict_msg = _('Someone else changed this page while you were editing!')
                 if self.mergeEditConflict(rev):
                     conflict_msg = _("""Someone else saved this page while you were editing!
-Please review the page and save then. Do not save this page as it is!""") 
+Please review the page and save then. Do not save this page as it is!""")
                     rev = self.current_rev()
             if conflict_msg:
                 # We don't show preview when in conflict
                 preview = None
-                
+
         elif self.exists():
             # revision of existing page
             rev = self.current_rev()
@@ -242,9 +241,9 @@
         status = [msg for msg in status if msg]
         status = ' '.join(status)
         status = Status(self.request, content=status)
-        
+
         self.request.theme.send_title(
-            title % {'pagename': self.split_title(self.request),},
+            title % {'pagename': self.split_title(self.request), },
             page=self,
             pagename=self.page_name, msg=status,
             html_head=self.lock.locktype and (
@@ -257,7 +256,7 @@
                     }) or '',
             editor_mode=1,
         )
-        
+
         self.request.write(self.request.formatter.startContent("content"))
 
         # Get the text body for the editor field.
@@ -298,7 +297,7 @@
         # editor area to the right after you begin to type...). IE sucks...
         # http://fplanque.net/2003/Articles/iecsstextarea/
         self.request.write('<fieldset style="border:none;padding:0;">')
-        
+
         self.request.write(unicode(html.INPUT(type="hidden", name="action", value="edit")))
 
         # Send revision of the page our edit is based on
@@ -319,7 +318,7 @@
 
         save_button_text = _('Save Changes')
         cancel_button_text = _('Cancel')
-        
+
         if self.cfg.page_license_enabled:
             self.request.write('<p><em>', _(
 """By hitting '''%(save_button_text)s''' you put your changes under the %(license_link)s.
@@ -339,7 +338,7 @@
             self.request.write('''
 <input id="switch2gui" style="display: none;" class="button" type="submit" name="button_switch" value="%s">
 ''' % (_('GUI Mode'),))
-            
+
         self.request.write('''
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
@@ -360,7 +359,7 @@
 <textarea id="editor-textarea" name="savetext" lang="%(lang)s" dir="%(dir)s" rows="%(rows)d"
           onChange="flgChange = true;" onKeyPress="flgChange = true;">\
 %(text)s\
-</textarea>''' %   {
+</textarea>''' % {
             'lang': lang,
             'dir': i18n.getDirection(lang),
             'rows': text_rows,
@@ -390,7 +389,7 @@
 &nbsp;
 <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s>
 <label for="chktrivial">%(label)s</label> ''' % {
-                'checked': ('', 'checked')[form.get('trivial',['0'])[0] == '1'],
+                'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
                 'label': _("Trivial change"),
                 })
 
@@ -399,7 +398,7 @@
 <input type="checkbox" name="rstrip" id="chkrstrip" value="1" %(checked)s>
 <label for="chkrstrip">%(label)s</label>
 ''' % {
-            'checked': ('', 'checked')[form.get('rstrip',['0'])[0] == '1'],
+            'checked': ('', 'checked')[form.get('rstrip', ['0'])[0] == '1'],
             'label': _('Remove trailing whitespace from each line')
             })
         self.request.write("</p>")
@@ -413,7 +412,7 @@
                 self.request.write("<p>%s</p>" % msg)
         self.request.write('</fieldset>')
         self.request.write("</form>")
-        
+
         # QuickHelp originally by Georg Mischler <schorsch@lightingwiki.com>
         markup = self.pi_format or self.request.cfg.default_markup
         quickhelp = self.request.cfg.editor_quickhelp.get(markup, "")
@@ -472,7 +471,7 @@
         # Check whether a page with the new name already exists
         if newpage.exists(includeDeleted=1):
             return False, pageexists_error
-        
+
         # Get old page text
         savetext = self.get_raw_body()
 
@@ -533,7 +532,7 @@
             msg = msg.replace(
                 _("Thank you for your changes. Your attention to detail is appreciated."),
                 _('Page "%s" was successfully deleted!') % (self.page_name,))
-            
+
             if self.request.cfg.xapian_search:
                 from MoinMoin.search.Xapian import Index
                 index = Index(self.request)
@@ -550,10 +549,10 @@
             # XXX Error handling
             success = False
             msg = "SaveError has occured in PageEditor.deletePage. We need locking there."
-        
+
         # reset page object
         self.reset()
-        
+
         # delete pagelinks
         arena = self
         key = 'pagelinks'
@@ -562,7 +561,7 @@
 
         # forget in-memory page text
         self.set_raw_body(None)
-        
+
         # clean the in memory acl cache
         self.clean_acl_cache()
 
@@ -613,15 +612,14 @@
         else:
             lines = wikiutil.pagediff(self.request, self.page_name, revisions[1],
                                       self.page_name, revisions[0])
-            
             if lines:
                 mailBody = mailBody + "%s\n%s\n" % (("-" * 78), '\n'.join(lines))
             else:
                 mailBody = mailBody + _("No differences found!\n", formatted=False)
-        
+
         return sendmail.sendmail(self.request, emails,
             _('[%(sitename)s] %(trivial)sUpdate of "%(pagename)s" by %(username)s', formatted=False) % {
-                'trivial' : (trivial and _("Trivial ", formatted=False)) or "",
+                'trivial': (trivial and _("Trivial ", formatted=False)) or "",
                 'sitename': self.cfg.sitename or "Wiki",
                 'pagename': self.page_name,
                 'username': self.uid_override or user.getUserIdentification(self.request),
@@ -648,7 +646,7 @@
             results = [_('Status of sending notification mails:')]
             for lang in subscribers.keys():
                 emails = map(lambda u: u.email, subscribers[lang])
-                names  = map(lambda u: u.name,  subscribers[lang])
+                names = map(lambda u: u.name, subscribers[lang])
                 mailok, status = self._sendNotification(comment, emails, lang, revisions, trivial)
                 recipients = ", ".join(names)
                 results.append(_('[%(lang)s] %(recipients)s: %(status)s') % {
@@ -656,7 +654,7 @@
 
             # Return mail sent results. Ignore trivial - we don't have
             # to lie. If mail was sent, just tell about it.
-            return '<p>\n%s\n</p> ' % '<br>'.join(results) 
+            return '<p>\n%s\n</p> ' % '<br>'.join(results)
 
         # No mail sent, no message.
         return ''
@@ -711,7 +709,7 @@
             'USER': "-- %s" % signature,
             'SIG': "-- %s [[DateTime(%s)]]" % (signature, now),
         }
-  
+
         if user.valid and user.name:
             if user.email:
                 variables['MAILTO'] = "[[MailTo(%s)]]" % user.email
@@ -720,12 +718,12 @@
             userDictPage = user.name + "/MyDict"
             if self.request.dicts.has_dict(userDictPage):
                 variables.update(self.request.dicts.dict(userDictPage))
-                      
+
         # TODO: Use a more stream-lined re.sub algorithm
         for name in variables:
             text = text.replace('@%s@' % name, variables[name])
         return text
-  
+
     def normalizeText(self, text, **kw):
         """ Normalize text
 
@@ -740,9 +738,9 @@
         @keyword stripspaces: if 1, strip spaces from text
         @rtype: unicode
         @return: normalized text
-        """     
+        """
         if text:
-            lines = text.splitlines()            
+            lines = text.splitlines()
             # Strip trailing spaces if needed
             if kw.get('stripspaces', 0):
                 lines = [line.rstrip() for line in lines]
@@ -785,9 +783,9 @@
         pagename = self.page_name
         date = self.request.user.getFormattedDateTime(time.time())
         intro += _('## backup of page "%(pagename)s" submitted %(date)s') % {
-            'pagename': pagename, 'date': date,} + u'\n'
+            'pagename': pagename, 'date': date, } + u'\n'
         backuppage._write_file(intro + newtext)
-        
+
         return backuppage.url(self.request)
 
     def _get_pragmas(self, text):
@@ -796,14 +794,14 @@
             if not line or line[0] != '#':
                 # end of pragmas
                 break
-            
+
             if len(line) > 1 and line[1] == '#':
                 # a comment within pragmas
                 continue
-            
+
             verb, args = (line[1:]+' ').split(' ', 1)
             pragmas[verb.lower()] = args.strip()
-            
+
         return pragmas
 
     def copypage(self):
@@ -845,9 +843,9 @@
         pagedir = self.getPagePath(use_underlay=0, check_create=0)
 
         revdir = os.path.join(pagedir, 'revisions')
-        cfn = os.path.join(pagedir,'current')
-        clfn = os.path.join(pagedir,'current-locked')
-        
+        cfn = os.path.join(pagedir, 'current')
+        clfn = os.path.join(pagedir, 'current-locked')
+
         # !!! these log objects MUST be created outside the locked area !!!
 
         # The local log should be the standard edit log, not the
@@ -857,15 +855,15 @@
                                uid_override=self.uid_override)
         # Open the global log
         glog = editlog.EditLog(self.request, uid_override=self.uid_override)
-        
+
         if not os.path.exists(pagedir): # new page, create and init pagedir
             os.mkdir(pagedir)
-        if not os.path.exists(revdir):        
+        if not os.path.exists(revdir):
             os.mkdir(revdir)
             f = open(cfn, 'w')
             f.write('%08d\n' % 0)
             f.close()
-            
+
         got_lock = False
         retry = 0
 
@@ -881,10 +879,10 @@
                             time.sleep(0.1)
                         else:
                             raise self.CouldNotLock, _("Page could not get locked. Unexpected error (errno=%d).") % err.errno
-                
+
                 if not got_lock:
                     raise self.CouldNotLock, _("Page could not get locked. Missing 'current' file?")
-                
+
                 # increment rev number of current(-locked) page
                 f = open(clfn)
                 revstr = f.read()
@@ -897,7 +895,7 @@
                 f = open(clfn, 'w')
                 f.write(revstr+'\n')
                 f.close()
-                
+
                 # save to page file
                 pagefile = os.path.join(revdir, revstr)
                 f = codecs.open(pagefile, 'wb', config.charset)
@@ -907,10 +905,10 @@
                 mtime_usecs = wikiutil.timestamp2version(os.path.getmtime(pagefile))
                 # set in-memory content
                 self.set_raw_body(text)
-                
+
                 # reset page object
                 self.reset()
-                
+
                 # write the editlog entry
                 # for now simply make 2 logs, better would be some multilog stuff maybe
                 if self.do_revision_backup:
@@ -951,7 +949,7 @@
         #!!! rev check is not enough since internal operations use "0"
 
         # expand variables, unless it's a template or form page
-        if not wikiutil.isTemplatePage(self.request, self.page_name): 
+        if not wikiutil.isTemplatePage(self.request, self.page_name):
             newtext = self._expand_variables(newtext)
 
         msg = ""
@@ -970,7 +968,7 @@
             pagelog = self.getPagePath('edit-log', use_underlay=0, isfile=1)
             next_line = None
             for line in editlog.EditLog(self.request, pagelog).reverse():
-                if int(line.rev)==int(rev):
+                if int(line.rev) == int(rev):
                     break
                 if not line.is_from_current_user(self.request):
                     other = True
@@ -978,7 +976,7 @@
             if next_line and next_line.is_from_current_user(self.request):
                 saved_page = Page(self.request, self.page_name,
                                   rev=int(next_line.rev))
-                if newtext==saved_page.get_raw_body():
+                if newtext == saved_page.get_raw_body():
                     msg = _("You already saved this page!")
                     return msg
                 else:
@@ -986,7 +984,7 @@
                     raise self.EditConflict, msg
 
                 msg = _("""Someone else saved this page while you were editing!
-Please review the page and save then. Do not save this page as it is!""") 
+Please review the page and save then. Do not save this page as it is!""")
 
             if backup_url:
                 msg += "<p>%s</p>" % _(
@@ -1007,27 +1005,27 @@
                 action != "SAVE/REVERT"):
                 msg = _("You can't change ACLs on this page since you have no admin rights on it!")
                 raise self.NoAdmin, msg
-        
+
         # save only if no error occurred (msg is empty)
         if not msg:
             # set success msg
             msg = _("Thank you for your changes. Your attention to detail is appreciated.")
-            
+
             # determine action for edit log 
             if action == 'SAVE' and not self.exists():
                 action = 'SAVENEW'
             comment = kw.get('comment', u'')
             extra = kw.get('extra', u'')
             trivial = kw.get('trivial', 0)
-            
+
             # write the page file
             mtime_usecs, rev = self._write_file(newtext, action, comment, extra)
             self.clean_acl_cache()
-  
+
             # send notification mails
             if self.request.cfg.mail_enabled:
                 msg = msg + self._notifySubscribers(comment, trivial)
-          
+
             if kw.get('index', 1) and self.request.cfg.xapian_search:
                 from MoinMoin.search.Xapian import Index
                 index = Index(self.request)
@@ -1038,10 +1036,10 @@
         # !!! this is a little fishy, since the lock owner might not notice
         # we broke his lock ==> but revision checking during preview will
         self.lock.release(force=not msg) # XXX does "not msg" make any sense?
-  
+
         return msg
-            
-            
+
+
 class PageLock:
     """
     PageLock - Lock pages
@@ -1174,7 +1172,7 @@
                 entry = editlog.EditLog(self.request, filename=self._filename()).next()
             except StopIteration:
                 entry = None
-                                                    
+
             if entry:
                 self.owner = entry.userid or entry.addr
                 self.owner_html = entry.getEditor(self.request)
--- a/MoinMoin/PageGraphicalEditor.py	Mon Sep 18 22:32:37 2006 +0200
+++ b/MoinMoin/PageGraphicalEditor.py	Mon Sep 18 22:58:53 2006 +0200
@@ -23,8 +23,7 @@
 def execute(pagename, request):
     if not request.user.may.write(pagename):
         _ = request.getText
-        Page(request, pagename).send_page(request,
-            msg = _('You are not allowed to edit this page.'))
+        Page(request, pagename).send_page(request, msg=_('You are not allowed to edit this page.'))
         return
 
     PageGraphicalEditor(request, pagename).sendEditor()
@@ -101,7 +100,7 @@
         lock_expire = _("Your edit lock on %(lock_page)s has expired!") % {'lock_page': lock_page}
         lock_mins = _("Your edit lock on %(lock_page)s will expire in # minutes.") % {'lock_page': lock_page}
         lock_secs = _("Your edit lock on %(lock_page)s will expire in # seconds.") % {'lock_page': lock_page}
-                
+
         # get request parameters
         try:
             text_rows = int(form['rows'][0])
@@ -113,7 +112,7 @@
         if preview is not None:
             # Propagate original revision
             rev = int(form['rev'][0])
-            
+
             # Check for editing conflicts
             if not self.exists():
                 # page does not exist, are we creating it?
@@ -128,7 +127,7 @@
             if conflict_msg:
                 # We don't show preview when in conflict
                 preview = None
-                
+
         elif self.exists():
             # revision of existing page
             rev = self.current_rev()
@@ -137,7 +136,7 @@
             rev = 0
 
         self.setConflict(bool(conflict_msg))
-        
+
         # Page editing is done using user language
         self.request.setContentLanguage(self.request.lang)
 
@@ -146,9 +145,9 @@
         status = [msg for msg in status if msg]
         status = ' '.join(status)
         status = Status(self.request, content=status)
-        
+
         self.request.theme.send_title(
-            title % {'pagename': self.split_title(self.request),},
+            title % {'pagename': self.split_title(self.request), },
             page=self,
             pagename=self.page_name, msg=status,
             html_head=self.lock.locktype and (
@@ -161,7 +160,7 @@
                     }) or '',
             editor_mode=1,
         )
-        
+
         self.request.write(self.request.formatter.startContent("content"))
 
         # Get the text body for the editor field.
@@ -202,7 +201,7 @@
         # editor area to the right after you begin to type...). IE sucks...
         # http://fplanque.net/2003/Articles/iecsstextarea/
         self.request.write('<fieldset style="border:none;padding:0;">')
-        
+
         self.request.write(unicode(html.INPUT(type="hidden", name="action", value="edit")))
 
         # Send revision of the page our edit is based on
@@ -223,7 +222,7 @@
 
         save_button_text = _('Save Changes')
         cancel_button_text = _('Cancel')
-        
+
         if self.cfg.page_license_enabled:
             self.request.write('<p><em>', _(
 """By hitting '''%(save_button_text)s''' you put your changes under the %(license_link)s.
@@ -262,7 +261,7 @@
         smileypath = themepath + '/img'
         # auto-generating a list for SmileyImages does NOT work from here!
         editor_size = int(request.user.edit_rows) * 22 # 22 height_pixels/line
-        word_rule = self.word_rule() 
+        word_rule = self.word_rule()
 
         self.request.write("""
 <script type="text/javascript" src="%(fckbasepath)s/fckeditor.js"></script>
@@ -317,7 +316,7 @@
 &nbsp;
 <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s>
 <label for="chktrivial">%(label)s</label> ''' % {
-                'checked': ('', 'checked')[form.get('trivial',['0'])[0] == '1'],
+                'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
                 'label': _("Trivial change"),
                 })
 
@@ -326,7 +325,7 @@
 <input type="checkbox" name="rstrip" id="chkrstrip" value="1" %(checked)s>
 <label for="chkrstrip">%(label)s</label>
 </p> ''' % {
-            'checked': ('', 'checked')[form.get('rstrip',['0'])[0] == '1'],
+            'checked': ('', 'checked')[form.get('rstrip', ['0'])[0] == '1'],
             'label': _('Remove trailing whitespace from each line')
             })
 
@@ -341,7 +340,6 @@
                 self.request.write("<p>%s</p>" % msg)
         self.request.write('</fieldset>')
         self.request.write("</form>")
-        
 
         if preview is not None:
             if staytop:
@@ -354,3 +352,4 @@
         self.request.write(self.request.formatter.endContent()) # end content div
         self.request.theme.send_footer(self.page_name)
         self.request.theme.send_closing_html()
+
--- a/MoinMoin/wikiutil.py	Mon Sep 18 22:32:37 2006 +0200
+++ b/MoinMoin/wikiutil.py	Mon Sep 18 22:58:53 2006 +0200
@@ -1533,7 +1533,7 @@
 
 def containsConflictMarker(text):
     """ Returns true if there is a conflict marker in the text. """
-    return "/!\ '''Edit conflict" in text
+    return "/!\\ '''Edit conflict" in text
 
 def pagediff(request, pagename1, rev1, pagename2, rev2, **kw):
     """
@@ -1594,4 +1594,3 @@
     ourticket = createTicket(request, timestamp_str)
     return ticket == ourticket
 
-