changeset 2011:791bdedb0c20

fix lots of pep8 issues, mainly E12x
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Feb 2013 00:46:53 +0100
parents e317d66d89b3
children a2fdd71ecfe6
files MoinMoin/_tests/ldap_testbase.py MoinMoin/_tests/test_test_environ.py MoinMoin/_tests/test_user.py MoinMoin/_tests/test_wikiutil.py MoinMoin/app.py MoinMoin/apps/admin/views.py MoinMoin/apps/feed/views.py MoinMoin/apps/frontend/_tests/test_frontend.py MoinMoin/apps/frontend/views.py MoinMoin/auth/__init__.py MoinMoin/auth/_tests/test_ldap_login.py MoinMoin/auth/ldap_login.py MoinMoin/auth/openidrp.py MoinMoin/auth/smb_mount.py MoinMoin/config/default.py MoinMoin/conftest.py MoinMoin/constants/contenttypes.py MoinMoin/constants/misc.py MoinMoin/converter/_args.py MoinMoin/converter/_tests/test__args_wiki.py MoinMoin/converter/_tests/test_creole_in.py MoinMoin/converter/_tests/test_docbook_in.py MoinMoin/converter/_tests/test_docbook_out.py MoinMoin/converter/_tests/test_html_in.py MoinMoin/converter/_tests/test_html_in_out.py MoinMoin/converter/_tests/test_html_out.py MoinMoin/converter/_tests/test_moinwiki_in.py MoinMoin/converter/_tests/test_registry.py MoinMoin/converter/_tests/test_rst_in.py MoinMoin/converter/_tests/test_rst_out.py MoinMoin/converter/_tests/test_smiley.py MoinMoin/converter/archive_in.py MoinMoin/converter/creole_in.py MoinMoin/converter/docbook_in.py MoinMoin/converter/docbook_out.py MoinMoin/converter/html_in.py MoinMoin/converter/html_out.py MoinMoin/converter/include.py MoinMoin/converter/link.py MoinMoin/converter/macro.py MoinMoin/converter/markdown_in.py MoinMoin/converter/mediawiki_in.py MoinMoin/converter/moinwiki19_in.py MoinMoin/converter/moinwiki_in.py MoinMoin/converter/moinwiki_out.py MoinMoin/converter/rst_in.py MoinMoin/converter/rst_out.py MoinMoin/forms.py MoinMoin/items/__init__.py MoinMoin/items/_tests/test_Content.py MoinMoin/items/_tests/test_Item.py MoinMoin/items/content.py MoinMoin/macro/Date.py MoinMoin/mail/_tests/test_sendmail.py MoinMoin/mail/sendmail.py MoinMoin/script/account/resetpw.py MoinMoin/script/maint/index.py MoinMoin/script/maint/modify_item.py MoinMoin/script/maint/moinshell.py MoinMoin/search/_tests/test_analyzers.py MoinMoin/security/_tests/test_security.py MoinMoin/security/_tests/test_textcha.py MoinMoin/storage/__init__.py MoinMoin/storage/backends/_tests/__init__.py MoinMoin/storage/backends/_tests/test_fileserver.py MoinMoin/storage/middleware/indexing.py MoinMoin/storage/stores/_tests/conftest.py MoinMoin/themes/__init__.py MoinMoin/user.py MoinMoin/util/_tests/test_interwiki.py MoinMoin/util/_tests/test_mimetype.py MoinMoin/util/_tests/test_paramparser.py MoinMoin/util/_tests/test_pysupport.py MoinMoin/util/iri.py MoinMoin/util/mimetype.py MoinMoin/util/monkeypatch.py MoinMoin/util/paramparser.py MoinMoin/util/plugins.py MoinMoin/util/version.py setup.py wikiconfig.py
diffstat 81 files changed, 1404 insertions(+), 1495 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/ldap_testbase.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/_tests/ldap_testbase.py	Mon Feb 18 00:46:53 2013 +0100
@@ -84,13 +84,14 @@
 
 class Slapd(object):
     """ Manage a slapd process for testing purposes """
-    def __init__(self,
-                 config=None,  # config filename for -f
-                 executable=SLAPD_EXECUTABLE,
-                 debug_flags='',  # None,  # for -d stats,acl,args,trace,sync,config
-                 proto='ldap', ip='127.0.0.1', port=3890,  # use -h proto://ip:port
-                 service_name=''  # defaults to -n executable:port, use None to not use -n
-                ):
+    def __init__(
+        self,
+        config=None,  # config filename for -f
+        executable=SLAPD_EXECUTABLE,
+        debug_flags='',  # None,  # for -d stats,acl,args,trace,sync,config
+        proto='ldap', ip='127.0.0.1', port=3890,  # use -h proto://ip:port
+        service_name='',  # defaults to -n executable:port, use None to not use -n
+    ):
         self.executable = executable
         self.config = config
         self.debug_flags = debug_flags
@@ -153,14 +154,15 @@
 #set_tas_spins 0
 """
 
-    def __init__(self,
-                 basedn,
-                 rootdn, rootpw,
-                 instance=0,  # use different values when running multiple LdapEnvironments
-                 schema_dir='/etc/ldap/schema',  # directory with schemas
-                 coding='utf-8',  # coding used for config files
-                 timeout=10,  # how long to wait for slapd starting [s]
-                ):
+    def __init__(
+        self,
+        basedn,
+        rootdn, rootpw,
+        instance=0,  # use different values when running multiple LdapEnvironments
+        schema_dir='/etc/ldap/schema',  # directory with schemas
+        coding='utf-8',  # coding used for config files
+        timeout=10,  # how long to wait for slapd starting [s]
+    ):
         self.basedn = basedn
         self.rootdn = rootdn
         self.rootpw = rootpw
@@ -255,7 +257,7 @@
             started = self.ldap_env.start_slapd()
             if not started:
                 pytest.skip("Failed to start {0} process, please see your syslog / log files"
-                             " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
+                            " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
             self.ldap_env.load_directory(ldif_content=self.ldif_content)
 
         def teardown_class(self):
--- a/MoinMoin/_tests/test_test_environ.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/_tests/test_test_environ.py	Mon Feb 18 00:46:53 2013 +0100
@@ -35,10 +35,10 @@
 
 
 CONTENT_ACL = dict(
-        before="+All:write",  # need to write to sys pages
-        default="All:read,write,admin,create,destroy",
-        after="Me:create",
-        hierarchic=False,
+    before="+All:write",  # need to write to sys pages
+    default="All:read,write,admin,create,destroy",
+    after="Me:create",
+    hierarchic=False,
 )
 
 
--- a/MoinMoin/_tests/test_user.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/_tests/test_user.py	Mon Feb 18 00:46:53 2013 +0100
@@ -288,7 +288,7 @@
             u' User Name',
             u'User Name ',
             u'User   Name',
-            )
+        )
         for test in cases:
             assert not user.isValidName(test)
 
@@ -299,7 +299,7 @@
             u'ניר סופר',  # Hebrew
             u'CamelCase',  # Good old camel case
             u'가각간갇갈 갉갊감 갬갯걀갼'  # Hangul (gibberish)
-            )
+        )
         for test in cases:
             assert user.isValidName(test)
 
--- a/MoinMoin/_tests/test_wikiutil.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/_tests/test_wikiutil.py	Mon Feb 18 00:46:53 2013 +0100
@@ -19,11 +19,12 @@
 
 class TestCleanInput(object):
     def testCleanInput(self):
-        tests = [(u"", u""),  # empty
-                 (u"aaa\r\n\tbbb", u"aaa   bbb"),  # ws chars -> blanks
-                 (u"aaa\x00\x01bbb", u"aaabbb"),  # strip weird chars
-                 (u"a" * 500, u""),  # too long
-                ]
+        tests = [
+            (u"", u""),  # empty
+            (u"aaa\r\n\tbbb", u"aaa   bbb"),  # ws chars -> blanks
+            (u"aaa\x00\x01bbb", u"aaabbb"),  # strip weird chars
+            (u"a" * 500, u""),  # too long
+        ]
         for instr, outstr in tests:
             assert wikiutil.clean_input(instr) == outstr
 
@@ -99,7 +100,7 @@
             (u'a/', u'a'),
             (u'a/////b/////c', u'a/b/c'),
             (u'a b/////c d/////e f', u'a b/c d/e f'),
-            )
+        )
         for test, expected in cases:
             result = wikiutil.normalize_pagename(test, app.cfg)
             assert result == expected
@@ -114,7 +115,7 @@
             (u'a   b  /  c    d  /  e   f', u'a b/c d/e f'),
             # All 30 unicode spaces
             (CHARS_SPACES, u''),
-            )
+        )
         for test, expected in cases:
             result = wikiutil.normalize_pagename(test, app.cfg)
             assert result == expected
@@ -131,7 +132,7 @@
             (u'a  ', u'a'),
             (u'a  b  c', u'a b c'),
             (u'a  b  /  c  d  /  e  f', u'a b/c d/e f'),
-            )
+        )
         for test, expected in cases:
             result = wikiutil.normalize_pagename(test, app.cfg)
             assert result == expected
@@ -149,7 +150,7 @@
             (u'Name,:Group', u'NameGroup'),
             # remove than normalize spaces
             (u'Name ! @ # $ % ^ & * ( ) + Group', u'Name Group'),
-            )
+        )
         for test, expected in cases:
             # validate we are testing valid group names
             if wikiutil.isGroupItem(test):
@@ -232,13 +233,13 @@
 
 def testfile_headers():
     test_headers = [
-                #test_file, content_type
-                ('imagefile.gif', 'image/gif'),
-                ('testfile.txt', 'text/plain'),
-                ('pdffile.pdf', 'application/pdf'),
-                ('docfile.doc', 'application/msword'),
-                (None, 'application/octet-stream')
-                ]
+        # test_file, content_type
+        ('imagefile.gif', 'image/gif'),
+        ('testfile.txt', 'text/plain'),
+        ('pdffile.pdf', 'application/pdf'),
+        ('docfile.doc', 'application/msword'),
+        (None, 'application/octet-stream'),
+    ]
 
     for test_file, content_type in test_headers:
         result = wikiutil.file_headers(test_file, None, 10)
--- a/MoinMoin/app.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/app.py	Mon Feb 18 00:46:53 2013 +0100
@@ -47,8 +47,7 @@
 
 
 def create_app_ext(flask_config_file=None, flask_config_dict=None,
-                   moin_config_class=None, warn_default=True, **kwargs
-                  ):
+                   moin_config_class=None, warn_default=True, **kwargs):
     """
     Factory for moin wsgi apps
 
--- a/MoinMoin/apps/admin/views.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/apps/admin/views.py	Mon Feb 18 00:46:53 2013 +0100
@@ -49,8 +49,7 @@
                           email=rev.meta[EMAIL],
                           disabled=False,  # TODO: add to index
                           groups=[groupname for groupname in groups if rev.meta[NAME] in groups[groupname]],
-                     )
-                     for rev in revs]
+                     ) for rev in revs]
     return render_template('admin/userbrowser.html', user_accounts=user_accounts, title_name=_(u"Users"))
 
 
@@ -200,11 +199,12 @@
 def highlighterhelp():
     """display a table with list of available Pygments lexers"""
     import pygments.lexers
-    headings = [_('Lexer description'),
-                _('Lexer names'),
-                _('File patterns'),
-                _('Mimetypes'),
-               ]
+    headings = [
+        _('Lexer description'),
+        _('Lexer names'),
+        _('File patterns'),
+        _('Mimetypes'),
+    ]
     lexers = pygments.lexers.get_all_lexers()
     rows = sorted([[desc, ' '.join(names), ' '.join(patterns), ' '.join(mimetypes), ]
                    for desc, names, patterns, mimetypes in lexers])
@@ -217,9 +217,10 @@
 @admin.route('/interwikihelp', methods=['GET', ])
 def interwikihelp():
     """display a table with list of known interwiki names / urls"""
-    headings = [_('InterWiki name'),
-                _('URL'),
-               ]
+    headings = [
+        _('InterWiki name'),
+        _('URL'),
+    ]
     rows = sorted(app.cfg.interwiki_map.items())
     return render_template('user/interwikihelp.html',
                            title_name=_(u"Interwiki Names"),
@@ -230,9 +231,10 @@
 @admin.route('/itemsize', methods=['GET', ])
 def itemsize():
     """display a table with item sizes"""
-    headings = [_('Size'),
-                _('Item name'),
-               ]
+    headings = [
+        _('Size'),
+        _('Item name'),
+    ]
     rows = [(rev.meta[SIZE], rev.name)
             for rev in flaskg.storage.documents(wikiname=app.cfg.interwikiname)]
     rows = sorted(rows, reverse=True)
--- a/MoinMoin/apps/feed/views.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/apps/feed/views.py	Mon Feb 18 00:46:53 2013 +0100
@@ -101,7 +101,7 @@
                      author=author,
                      url=url_for_item(name, rev=this_revid, _external=True),
                      updated=datetime.fromtimestamp(rev.meta[MTIME]),
-                    )
+            )
         content = feed.to_string()
         # Hack to add XSLT stylesheet declaration since AtomFeed doesn't allow this
         content = content.split("\n")
--- a/MoinMoin/apps/frontend/_tests/test_frontend.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/apps/frontend/_tests/test_frontend.py	Mon Feb 18 00:46:53 2013 +0100
@@ -52,25 +52,25 @@
         self._test_view_post('frontend.ajaxdelete', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict(
             comment='Test',
             itemnames='["DoesntExist"]',
-            ), viewopts=dict(item_name='DoesntExist'))
+        ), viewopts=dict(item_name='DoesntExist'))
 
     def test_ajaxdelete_no_item_name_route(self):
         self._test_view_post('frontend.ajaxdelete', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict(
             comment='Test',
             itemnames='["DoesntExist"]',
-            ))
+        ))
 
     def test_ajaxdestroy_item_name_route(self):
         self._test_view_post('frontend.ajaxdestroy', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict(
             comment='Test',
             itemnames='["DoesntExist"]',
-            ), viewopts=dict(item_name='DoesntExist'))
+        ), viewopts=dict(item_name='DoesntExist'))
 
     def test_ajaxdestroy_no_item_name_route(self):
         self._test_view_post('frontend.ajaxdestroy', status='200 OK', content_types=['application/json', ], data=['{', '}'], form=dict(
             comment='Test',
             itemnames='["DoesntExist"]',
-            ))
+        ))
 
     def test_ajaxmodify(self):
         self._test_view_post('frontend.ajaxmodify', status='404 NOT FOUND', viewopts=dict(item_name='DoesntExist'))
@@ -78,7 +78,7 @@
     def test_jfu_server(self):
         self._test_view_post('frontend.jfu_server', status='200 OK', data=['{', '}'], form=dict(
             data_file=FileStorage(StringIO("Hello, world"), filename='C:\\fakepath\\DoesntExist.txt', content_type='text/plain'),
-            ), viewopts=dict(item_name='WillBeCreated'), content_types=['application/json', ])
+        ), viewopts=dict(item_name='WillBeCreated'), content_types=['application/json', ])
 
     def test_show_item(self):
         self._test_view('frontend.show_item', status='404 NOT FOUND', viewopts=dict(item_name='DoesntExist'))
@@ -281,14 +281,12 @@
         """ helper to fill UserSettingsPasswordForm form
         """
         FormClass = views.UserSettingsPasswordForm
-        request_form = ImmutableMultiDict(
-           [
-              ('usersettings_password_password_current', current_password),
-              ('usersettings_password_password1', password1),
-              ('usersettings_password_password2', password2),
-              ('usersettings_password_submit', u'Save')
-           ]
-        )
+        request_form = ImmutableMultiDict([
+            ('usersettings_password_password_current', current_password),
+            ('usersettings_password_password1', password1),
+            ('usersettings_password_password2', password2),
+            ('usersettings_password_submit', u'Save')
+        ])
         form = FormClass.from_flat(request_form)
         return form
 
--- a/MoinMoin/apps/frontend/views.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/apps/frontend/views.py	Mon Feb 18 00:46:53 2013 +0100
@@ -206,7 +206,7 @@
                                            title_name=title_name,
                                            lookup_form=lookup_form,
                                            results=results,
-                                          )
+                    )
                     flaskg.clock.stop('lookup render')
                     if not num_results:
                         status = 404
@@ -214,7 +214,7 @@
     html = render_template('lookup.html',
                            title_name=title_name,
                            lookup_form=lookup_form,
-                          )
+    )
     return Response(html, status)
 
 
@@ -292,14 +292,14 @@
                                    query=query,
                                    medium_search_form=search_form,
                                    item_name=item_name,
-                                  )
+            )
             flaskg.clock.stop('search render')
     else:
         html = render_template('search.html',
                                query=query,
                                medium_search_form=search_form,
                                item_name=item_name,
-                              )
+        )
     return html
 
 
@@ -367,7 +367,7 @@
         status = 200
     content = render_template('dom.xml',
                               data_xml=Markup(item.content._render_data_xml()),
-                             )
+    )
     return Response(content, status, mimetype='text/xml')
 
 
@@ -390,7 +390,7 @@
     return render_template('highlight.html',
                            item=item, item_name=item.name,
                            data_text=Markup(item.content._render_data_highlight()),
-                          )
+    )
 
 
 @presenter('meta', add_trail=True)
@@ -413,7 +413,7 @@
                            meta_rendered=Markup(item._render_meta()),
                            show_revision=show_revision,
                            show_navigation=show_navigation,
-                          )
+    )
 
 
 @frontend.route('/+content/+<rev>/<itemname:item_name>')
@@ -536,7 +536,7 @@
                            item=item, item_name=item_name,
                            rev_id=rev,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+rename/<itemname:item_name>', methods=['GET', 'POST'])
@@ -564,7 +564,7 @@
     return render_template(item.rename_template,
                            item=item, item_name=item_name,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+delete/<itemname:item_name>', methods=['GET', 'POST'])
@@ -593,7 +593,7 @@
     return render_template(item.delete_template,
                            item=item, item_name=item_name,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+ajaxdelete/<itemname:item_name>', methods=['POST'])
@@ -695,7 +695,7 @@
                            item=item, item_name=item_name,
                            rev_id=rev,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+jfu-server/<itemname:item_name>', methods=['POST'])
@@ -721,7 +721,7 @@
                        size=size,
                        url=url_for('.show_item', item_name=item_name, rev=revid),
                        contenttype=contenttype_to_class(contenttype),
-                      )
+        )
     except AccessDenied:
         abort(403)
 
@@ -775,7 +775,7 @@
                            initials=initials,
                            startswith=startswith,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+mychanges')
@@ -790,7 +790,7 @@
                            title_name=_(u'My Changes'),
                            headline=_(u'My Changes'),
                            item_names=my_changes
-                          )
+    )
 
 
 def _mychanges(userid):
@@ -821,7 +821,7 @@
                            item_name=item_name,
                            headline=_(u"Items which refer to '%(item_name)s'", item_name=item_name),
                            item_names=refs_here
-                          )
+    )
 
 
 def _backrefs(item_name):
@@ -861,7 +861,7 @@
                            item_name=item_name,  # XXX no item here
                            history_page=history_page,
                            bookmark_time=bookmark_time,
-                          )
+    )
 
 
 @frontend.route('/+history')
@@ -897,7 +897,7 @@
                            history=history,
                            current_timestamp=current_timestamp,
                            bookmark_time=bookmark_time,
-                          )
+    )
 
 
 def _compute_item_sets():
@@ -980,7 +980,7 @@
         # Try to unsubscribe
         if not u.unsubscribe(item_name):
             msg = _("Can't remove regular expression subscription!") + u' ' + \
-                  _("Edit the subscription regular expressions in your settings."), "error"
+                _("Edit the subscription regular expressions in your settings."), "error"
     else:
         # Try to subscribe
         if not u.subscribe(item_name):
@@ -1102,7 +1102,7 @@
                     else:
                         flash(_('An error occurred while sending the verification email: "%(message)s" '
                                 'Please contact an administrator to activate your account.',
-                            message=msg), "error")
+                                message=msg), "error")
                 else:
                     flash(_('Account created, please log in now.'), "info")
                 return redirect(url_for('.show_root'))
@@ -1110,7 +1110,7 @@
     return render_template(template,
                            title_name=title_name,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+verifyemail', methods=['GET'])
@@ -1183,7 +1183,7 @@
     return render_template('lostpass.html',
                            title_name=title_name,
                            form=form,
-                          )
+    )
 
 
 class ValidPasswordRecovery(Validator):
@@ -1244,7 +1244,7 @@
     return render_template('recoverpass.html',
                            title_name=title_name,
                            form=form,
-                          )
+    )
 
 
 class ValidLogin(Validator):
@@ -1317,7 +1317,7 @@
                            title_name=title_name,
                            login_inputs=app.cfg.auth_login_inputs,
                            form=form,
-                          )
+    )
 
 
 @frontend.route('/+logout')
@@ -1531,7 +1531,7 @@
                 response['form'] = render_template('usersettings_ajax.html',
                                                    part=part,
                                                    form=form,
-                                                  )
+                )
                 return jsonify(**response)
             else:
                 # if it is not a XHR request but there is an redirect pending, we use a normal HTTP redirect
@@ -1550,7 +1550,7 @@
     return render_template('usersettings.html',
                            title_name=title_name,
                            form_objs=forms,
-                          )
+    )
 
 
 @frontend.route('/+bookmark')
@@ -1661,7 +1661,7 @@
                            last_rev_id=rev_ids[-1],
                            oldrev=oldrev,
                            newrev=newrev,
-                          )
+    )
 
 
 def _diff_raw(item, revid1, revid2):
@@ -1832,7 +1832,7 @@
     return render_template('sitemap.html',
                            item_name=item_name,  # XXX no item
                            sitemap=sitemap,
-                          )
+    )
 
 
 class NestedItemListBuilder(object):
--- a/MoinMoin/auth/__init__.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/auth/__init__.py	Mon Feb 18 00:46:53 2013 +0100
@@ -289,7 +289,7 @@
                  remove_blanks=False,  # Joe Doe -> JoeDoe
                  coding='utf-8',  # for decoding REMOTE_USER correctly
                  **kw
-                ):
+    ):
         super(GivenAuth, self).__init__(**kw)
         self.env_var = env_var
         self.user_name = user_name
@@ -381,7 +381,7 @@
               'openid': kw.get('login_openid'),
               'multistage': (stage and True) or None,
               'attended': True
-             }
+    }
     # add the other parameters from the form
     for param in kw.keys():
         params[param] = kw.get(param)
--- a/MoinMoin/auth/_tests/test_ldap_login.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/auth/_tests/test_ldap_login.py	Mon Feb 18 00:46:53 2013 +0100
@@ -151,7 +151,7 @@
             started = ldap_env.start_slapd()
             if not started:
                 pytest.skip("Failed to start {0} process, please see your syslog / log files"
-                             " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
+                            " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
             ldap_env.load_directory(ldif_content=self.ldif_content)
             self.ldap_envs.append(ldap_env)
 
@@ -191,7 +191,7 @@
             started = ldap_env.start_slapd()
             if not started:
                 pytest.skip("Failed to start {0} process, please see your syslog / log files"
-                             " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
+                            " (and check if stopping apparmor helps, in case you use it).".format(SLAPD_EXECUTABLE))
             ldap_env.load_directory(ldif_content=self.ldif_content)
             self.ldap_envs.append(ldap_env)
 
@@ -201,13 +201,13 @@
         server_uri = 'ldap://127.0.0.1:3891'
         base_dn = 'ou=testing,dc=example,dc=org'
         ldap_auth1 = LDAPAuth(server_uri=server_uri, base_dn=base_dn,
-                             name="ldap1", autocreate=True,
-                             timeout=1)
+                              name="ldap1", autocreate=True,
+                              timeout=1)
         # short timeout, faster testing
         server_uri = 'ldap://127.0.0.1:3892'
         ldap_auth2 = LDAPAuth(server_uri=server_uri, base_dn=base_dn,
-                             name="ldap2", autocreate=True,
-                             timeout=1)
+                              name="ldap2", autocreate=True,
+                              timeout=1)
 
         auth = [ldap_auth1, ldap_auth2]
 
--- a/MoinMoin/auth/ldap_login.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/auth/ldap_login.py	Mon Feb 18 00:46:53 2013 +0100
@@ -41,7 +41,8 @@
     logout_possible = True
     name = 'ldap'
 
-    def __init__(self,
+    def __init__(
+        self,
         server_uri='ldap://localhost',  # ldap / active directory server URI
                                         # use ldaps://server:636 url for ldaps,
                                         # use  ldap://server for ldap without tls (and set start_tls to 0),
@@ -87,7 +88,7 @@
         name='ldap',  # use e.g. 'ldap_pdc' and 'ldap_bdc' (or 'ldap1' and 'ldap2') if you auth against 2 ldap servers
         report_invalid_credentials=True,  # whether to emit "invalid username or password" msg at login time or not
         **kw
-        ):
+    ):
         super(LDAPAuth, self).__init__(**kw)
         self.server_uri = server_uri
         self.bind_dn = bind_dn
@@ -176,11 +177,11 @@
                 filterstr = self.search_filter % locals()
                 logging.debug("Searching {0!r}".format(filterstr))
                 attrs = [getattr(self, attr) for attr in [
-                                         'email_attribute',
-                                         'displayname_attribute',
-                                         'surname_attribute',
-                                         'givenname_attribute',
-                                         ] if getattr(self, attr) is not None]
+                    'email_attribute',
+                    'displayname_attribute',
+                    'surname_attribute',
+                    'givenname_attribute',
+                ] if getattr(self, attr) is not None]
                 lusers = l.search_st(self.base_dn, self.scope, filterstr.encode(coding),
                                      attrlist=attrs, timeout=self.timeout)
                 # we remove entries with dn == None to get the real result list:
--- a/MoinMoin/auth/openidrp.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/auth/openidrp.py	Mon Feb 18 00:46:53 2013 +0100
@@ -99,7 +99,7 @@
                                                            _external=True,
                                                            openid_openid=identity,
                                                            openid_submit='1'
-                                                          ))
+                    ))
 
             # not trusted
             return ContinueLogin(None, _('This OpenID provider is not trusted.'))
--- a/MoinMoin/auth/smb_mount.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/auth/smb_mount.py	Mon Feb 18 00:46:53 2013 +0100
@@ -23,7 +23,8 @@
 
         See man mount.cifs for details.
     """
-    def __init__(self,
+    def __init__(
+        self,
         server,  # mount.cifs //server/share
         share,  # mount.cifs //server/share
         mountpoint_fn,  # function of username to determine the mountpoint, e.g.:
@@ -36,7 +37,7 @@
         coding='utf-8',  # encoding used for username/password/cmdline (try 'iso8859-1' if default does not work)
         log='/dev/null',  # logfile for mount.cifs output
         **kw
-        ):
+    ):
         super(SMBMount, self).__init__(**kw)
         self.server = server
         self.share = share
--- a/MoinMoin/config/default.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/config/default.py	Mon Feb 18 00:46:53 2013 +0100
@@ -181,9 +181,9 @@
         error message with unknown names.
         """
         unknown = ['"{0}"'.format(name) for name in dir(self)
-                  if not name.startswith('_') and
-                  name not in DefaultConfig.__dict__ and
-                  not isinstance(getattr(self, name), (type(re), type(DefaultConfig)))]
+                   if not name.startswith('_') and
+                   name not in DefaultConfig.__dict__ and
+                   not isinstance(getattr(self, name), (type(re), type(DefaultConfig)))]
         if unknown:
             msg = """
 Unknown configuration options: {0}.
@@ -287,7 +287,7 @@
 
     keyboards = (ur"`1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./",  # US kbd
                  ur"^1234567890ß´qwertzuiopü+asdfghjklöä#yxcvbnm,.-",  # german kbd
-                )  # TODO add more keyboards!
+    )  # TODO add more keyboards!
     for kbd in keyboards:
         rev_kbd = kbd[::-1]
         if password in kbd or password in rev_kbd or \
@@ -308,236 +308,222 @@
 # information on the layout of this structure.
 #
 options_no_group_name = {
-  # ==========================================================================
-  'datastruct': ('Datastruct', None, (
-    #('dicts', lambda cfg: datastruct.ConfigDicts({}),
-    ('dicts', lambda cfg: datastruct.WikiDicts(),
-     "function f(cfg) that returns a backend which is used to access dicts definitions."),
-    #('groups', lambda cfg: datastruct.ConfigGroups({}),
-    ('groups', lambda cfg: datastruct.WikiGroups(),
-     "function f(cfg) that returns a backend which is used to access groups definitions."),
-  )),
-  # ==========================================================================
-  'auth': ('Authentication / Authorization / Security', None, (
-    ('auth', DefaultExpression('[MoinAuth()]'),
-     "list of auth objects, to be called in this order (see HelpOnAuthentication)"),
-    ('secrets', None, """Either a long shared secret string used for multiple purposes or a dict {"purpose": "longsecretstring", ...} for setting up different shared secrets for different purposes."""),
-    ('SecurityPolicy',
-     DefaultSecurityPolicy,
-     "Class object hook for implementing security restrictions or relaxations"),
-    ('endpoints_excluded',
-     [],
-     "Exclude unwanted endpoints (list of strings)"),
-
-    ('password_checker', DefaultExpression('_default_password_checker'),
-     'checks whether a password is acceptable (default check is length >= 6, at least 4 different chars, no keyboard sequence, not username used somehow (you can switch this off by using `None`)'),
-
-    ('passlib_crypt_context', dict(
-        # schemes we want to support (or deprecated schemes for which we still have
-        # hashes in our storage).
-        # note about bcrypt: it needs additional code (that is not pure python and
-        # thus either needs compiling or installing platform-specific binaries)
-        schemes=["sha512_crypt", ],
-        # default scheme for creating new pw hashes (if not given, passlib uses first from schemes)
-        #default="sha512_crypt",
-        # deprecated schemes get auto-upgraded to the default scheme at login
-        # time or when setting a password (including doing a moin account pwreset).
-        #deprecated=["auto"],
-        # vary rounds parameter randomly when creating new hashes...
-        #all__vary_rounds=0.1,
-     ),
-     "passlib CryptContext arguments, see passlib docs"),
-  )),
-  # ==========================================================================
-  'spam_leech_dos': ('Anti-Spam / Leech / DOS',
-  'These settings help limiting ressource usage and avoiding abuse.',
-  (
-    ('textchas', None,
-     "Spam protection setup using site-specific questions/answers, see HelpOnSpam."),
-    ('textchas_expiry_time', 600,
-     "Time [s] for a !TextCha to expire."),
-  )),
-  # ==========================================================================
-  'style': ('Style / Theme / UI',
-  'These settings control how the wiki user interface will look like.',
-  (
-    ('sitename', u'Untitled Wiki',
-     "Short description of your wiki site, displayed below the logo on each page, and used in RSS documents as the channel title [Unicode]"),
-    ('interwikiname', None, "unique, stable and required InterWiki name (prefix, moniker) of the site [Unicode]"),
-    ('html_pagetitle', None, "Allows you to set a specific HTML page title (if None, it defaults to the value of `sitename`) [Unicode]"),
-    ('navi_bar', [
-        ('wikilink', 'frontend.show_root', dict(), L_('Home'), L_('Home Page')),
-        ('wikilink', 'frontend.global_history', dict(), L_('History'), L_('Global History')),
-        ('wikilink', 'frontend.index', dict(), L_('Index'), L_('Global Index')),
-        ('wikilink', 'frontend.global_tags', dict(), L_('Tags'), L_('Global Tags Index')),
-        ('wikilink', 'admin.index_user', dict(), L_('User'), L_('User')),
-        ('wikilink', 'admin.index', dict(), L_('Admin'), L_('Administration & Docs')),
-     ],
-     'Data to create the navi_bar from. Users can add more items in their quick links in user preferences. You need to configure a list of tuples (css_class, endpoint, args, label, title). Use L_() for translating. [list of tuples]'),
-
-    ('theme_default', u'modernized', "Default theme."),
-
-    ('serve_files', {},
-     """
-     Dictionary of name: filesystem_path for static file resources to serve
-     from the filesystem as url .../+serve/<name>/...
-     """),
-
-    ('supplementation_item_names', [u'Discussion', ],
-     "List of names of the supplementation (sub)items [Unicode]"),
-
-    ('interwiki_preferred', [], "In dialogues, show those wikis at the top of the list [list of Unicode]."),
-    ('sistersites', [], "list of tuples `('WikiName', 'sisterpagelist_fetch_url')`"),
-
-    ('trail_size', 5,
-     "Number of items in the trail of recently visited items"),
-
-    ('item_views', [
-        # (endpointname, label, check_item_exists
-        ('frontend.show_item', L_('Show'), L_('Show'), False, ),
-        ('frontend.download_item', L_('Download'), L_('Download'), True, ),
-        ('frontend.history', L_('History'), L_('Revision History'), True, ),
-        # note: when rendering a non-existing item, you'll be offered to
-        # create it (in the content area), so we do not offer "Modify":
-        ('frontend.modify_item', L_('Modify'), L_('Edit or Upload'), True, ),
-        ('special.supplementation', None, None, False, ),
-        ('frontend.index', L_('Index'), L_('List sub-items'), False, ),
-        ('special.comments', L_('Comments'), L_('Hide comments'), True, ),
-        ('special.transclusions', L_('Transclusions'), L_('Show transclusions'), True, ),
-        ('frontend.highlight_item', L_('Highlight'), L_('Show with Syntax-Highlighting'), True, ),
-        ('frontend.show_item_meta', L_('Meta'), L_('Display Metadata'), True, ),
-        ('frontend.quicklink_item', None, L_('Create or remove a navigation link to this item'), False, ),
-        ('frontend.subscribe_item', None, L_('Switch notifications about item changes on or off'), False, ),
-        ('frontend.rename_item', L_('Rename'), L_('Rename this item'), True, ),
-        ('frontend.delete_item', L_('Delete'), L_('Delete this item'), True, ),
-        ('frontend.destroy_item', L_('Destroy'), L_('Completely destroy this item'), True, ),
-        ('frontend.backrefs', L_('Referrers'), L_('What refers here?'), False, ),
-        ('frontend.sitemap', L_('Site Map'), L_('Local Site Map of this item'), True, ),
-        ('frontend.similar_names', L_('Similar'), L_('Items with similar names'), False, ),
-     ],
-     'list of edit bar entries (list of tuples (endpoint, label))'),
+    # ==========================================================================
+    'datastruct': ('Datastruct', None, (
+        # ('dicts', lambda cfg: datastruct.ConfigDicts({}),
+        ('dicts', lambda cfg: datastruct.WikiDicts(),
+         "function f(cfg) that returns a backend which is used to access dicts definitions."),
+        # ('groups', lambda cfg: datastruct.ConfigGroups({}),
+        ('groups', lambda cfg: datastruct.WikiGroups(),
+         "function f(cfg) that returns a backend which is used to access groups definitions."),
+    )),
+    # ==========================================================================
+    'auth': ('Authentication / Authorization / Security', None, (
+        ('auth', DefaultExpression('[MoinAuth()]'),
+         "list of auth objects, to be called in this order (see HelpOnAuthentication)"),
+        ('secrets', None, """Either a long shared secret string used for multiple purposes or a dict {"purpose": "longsecretstring", ...} for setting up different shared secrets for different purposes."""),
+        ('SecurityPolicy',
+         DefaultSecurityPolicy,
+         "Class object hook for implementing security restrictions or relaxations"),
+        ('endpoints_excluded',
+         [],
+         "Exclude unwanted endpoints (list of strings)"),
+        ('password_checker', DefaultExpression('_default_password_checker'),
+         'checks whether a password is acceptable (default check is length >= 6, at least 4 different chars, no keyboard sequence, not username used somehow (you can switch this off by using `None`)'),
 
-    ('show_hosts', True,
-     "if True, show host names and IPs. Set to False to hide them."),
-    ('show_interwiki', False,
-     "if True, let the theme display your interwiki name"),
-    ('show_names', True,
-     "if True, show user names in the revision history and on Recent``Changes. Set to False to hide them."),
-    ('show_section_numbers', False,
-     'show section numbers in headings by default'),
-    ('show_rename_redirect', False, "if True, offer creation of redirect pages when renaming wiki pages"),
-
-    ('template_dirs', [], "list of directories with templates that will override theme and base templates."),
-  )),
-  # ==========================================================================
-  'editor': ('Editor', None, (
-    ('item_license', u'', 'if set, show the license item within the editor. [Unicode]'),
-    #('edit_locking', 'warn 10', "Editor locking policy: `None`, `'warn <timeout in minutes>'`, or `'lock <timeout in minutes>'`"),
-    ('edit_ticketing', True, None),
-  )),
-  # ==========================================================================
-  'paging': ('Paging', None, (
-    ('results_per_page', 50, "Number of results to be shown on a single page in pagination"),
-  )),
-  # ==========================================================================
-  'data': ('Data Storage', None, (
-    ('data_dir', './data/', "Path to the data directory."),
-    ('plugin_dirs', [], "Plugin directories."),
-
-    ('interwiki_map', {},
-     "Dictionary of wiki_name -> wiki_url"),
-    ('namespace_mapping', None,
-    "A list of tuples, each tuple containing: Namespace identifier, backend name. " +
-    "E.g.: [('', 'default')), ]. Please see HelpOnStorageConfiguration for further reference."),
-    ('backend_mapping', None,
-    "A dictionary that maps backend names to backends. " +
-    "E.g.: {'default': Backend(), }. Please see HelpOnStorageConfiguration for further reference."),
-    ('acl_mapping', None,
-    "This needs to point to a list of tuples, each tuple containing: name prefix, acl protection to be applied to matching items. " +
-    "E.g.: [('', dict(default='All:read,write,create')), ]. Please see HelpOnStorageConfiguration for further reference."),
-    ('create_storage', False, "Create (initialize) the storage backends before trying to use them."),
-    ('create_index', False, "Create (initialize) the index before trying to use them."),
-    ('destroy_storage', False, "Destroy (empty) the storage backends after using them."),
-    ('destroy_index', False, "Destroy (empty) the index after using it."),
-  )),
-  # ==========================================================================
-  'items': ('Special Item Names', None, (
-    ('item_root', u'Home', "Name of the root item (aka 'front page'). [Unicode]"),
+        ('passlib_crypt_context', dict(
+            # schemes we want to support (or deprecated schemes for which we still have
+            # hashes in our storage).
+            # note about bcrypt: it needs additional code (that is not pure python and
+            # thus either needs compiling or installing platform-specific binaries)
+            schemes=["sha512_crypt", ],
+            # default scheme for creating new pw hashes (if not given, passlib uses first from schemes)
+            #default="sha512_crypt",
+            # deprecated schemes get auto-upgraded to the default scheme at login
+            # time or when setting a password (including doing a moin account pwreset).
+            #deprecated=["auto"],
+            # vary rounds parameter randomly when creating new hashes...
+            #all__vary_rounds=0.1,
+        ), "passlib CryptContext arguments, see passlib docs"),
+    )),
+    # ==========================================================================
+    'spam_leech_dos': ('Anti-Spam / Leech / DOS', 'These settings help limiting ressource usage and avoiding abuse.', (
+        ('textchas', None,
+         "Spam protection setup using site-specific questions/answers, see HelpOnSpam."),
+        ('textchas_expiry_time', 600,
+         "Time [s] for a !TextCha to expire."),
+    )),
+    # ==========================================================================
+    'style': ('Style / Theme / UI', 'These settings control how the wiki user interface will look like.', (
+        ('sitename', u'Untitled Wiki',
+         "Short description of your wiki site, displayed below the logo on each page, and used in RSS documents as the channel title [Unicode]"),
+        ('interwikiname', None, "unique, stable and required InterWiki name (prefix, moniker) of the site [Unicode]"),
+        ('html_pagetitle', None, "Allows you to set a specific HTML page title (if None, it defaults to the value of `sitename`) [Unicode]"),
+        ('navi_bar', [
+            ('wikilink', 'frontend.show_root', dict(), L_('Home'), L_('Home Page')),
+            ('wikilink', 'frontend.global_history', dict(), L_('History'), L_('Global History')),
+            ('wikilink', 'frontend.index', dict(), L_('Index'), L_('Global Index')),
+            ('wikilink', 'frontend.global_tags', dict(), L_('Tags'), L_('Global Tags Index')),
+            ('wikilink', 'admin.index_user', dict(), L_('User'), L_('User')),
+            ('wikilink', 'admin.index', dict(), L_('Admin'), L_('Administration & Docs')),
+        ], 'Data to create the navi_bar from. Users can add more items in their quick links in user preferences. You need to configure a list of tuples (css_class, endpoint, args, label, title). Use L_() for translating. [list of tuples]'),
 
-    # the following regexes should match the complete name when used in free text
-    # the group 'all' shall match all, while the group 'key' shall match the key only
-    # e.g. FooGroup -> group 'all' ==  FooGroup, group 'key' == Foo
-    # moin's code will add ^ / $ at beginning / end when needed
-    ('item_dict_regex', ur'(?P<all>(?P<key>\S+)Dict)',
-     'Item names exactly matching this regex are regarded as items containing variable dictionary definitions [Unicode]'),
-    ('item_group_regex', ur'(?P<all>(?P<key>\S+)Group)',
-     'Item names exactly matching this regex are regarded as items containing group definitions [Unicode]'),
-  )),
-  # ==========================================================================
-  'user': ('User Preferences', None, (
-    ('user_defaults',
-     {
-        NAME: [],
-        DISPLAY_NAME: None,
-        EMAIL: None,
-        OPENID: None,
-        CSS_URL: None,
-        MAILTO_AUTHOR: False,
-        EDIT_ON_DOUBLECLICK: True,
-        SCROLL_PAGE_AFTER_EDIT: True,
-        SHOW_COMMENTS: False,
-        WANT_TRIVIAL: False,
-        ENC_PASSWORD: u'',  # empty value == invalid hash
-        DISABLED: False,
-        BOOKMARKS: {},
-        QUICKLINKS: [],
-        SUBSCRIBED_ITEMS: [],
-        EMAIL_SUBSCRIBED_EVENTS: [
-            # XXX PageChangedEvent.__name__
-            # XXX PageRenamedEvent.__name__
-            # XXX PageDeletedEvent.__name__
-            # XXX PageCopiedEvent.__name__
-            # XXX PageRevertedEvent.__name__
-        ],
-        THEME_NAME: None,  # None -> use cfg.theme_default
-        EDIT_ROWS: 0,
-        RESULTS_PER_PAGE: 0,
-        LOCALE: None,  # None -> do browser language detection, otherwise just use this locale
-        TIMEZONE: None,  # None -> use cfg.timezone_default
-     },
-     'Default attributes of the user object'),
-  )),
-  # ==========================================================================
-  'various': ('Various', None, (
-    ('bang_meta', True, 'if True, enable {{{!NoWikiName}}} markup'),
+        ('theme_default', u'modernized', "Default theme."),
 
-    ('config_check_enabled', False, "if True, check configuration for unknown settings."),
-
-    ('timezone_default', u'UTC', "Default time zone."),
-    ('locale_default', u'en_US', "Default locale for user interface and content."),
-
-    ('log_remote_addr', True,
-     "if True, log the remote IP address (and maybe hostname)."),
-    ('log_reverse_dns_lookups', True,
-     "if True, do a reverse DNS lookup on page SAVE. If your DNS is broken, set this to False to speed up SAVE."),
+        ('serve_files', {},
+         """
+         Dictionary of name: filesystem_path for static file resources to serve
+         from the filesystem as url .../+serve/<name>/...
+         """),
 
-    # some dangerous mimetypes (we don't use "content-disposition: inline" for them when a user
-    # downloads such data, because the browser might execute e.g. Javascript contained
-    # in the HTML and steal your moin session cookie or do other nasty stuff)
-    ('mimetypes_xss_protect',
-     [
-       'text/html',
-       'application/x-shockwave-flash',
-       'application/xhtml+xml',
-     ],
-     '"content-disposition: inline" is not used for downloads of such data'),
+        ('supplementation_item_names', [u'Discussion', ],
+         "List of names of the supplementation (sub)items [Unicode]"),
 
-    ('refresh', None,
-     "refresh = (minimum_delay_s, targets_allowed) enables use of `#refresh 5 PageName` processing instruction, targets_allowed must be either `'internal'` or `'external'`"),
+        ('interwiki_preferred', [], "In dialogues, show those wikis at the top of the list [list of Unicode]."),
+        ('sistersites', [], "list of tuples `('WikiName', 'sisterpagelist_fetch_url')`"),
 
-    ('siteid', 'MoinMoin', None),  # XXX just default to some existing module name to
-                                   # make plugin loader etc. work for now
-  )),
+        ('trail_size', 5,
+         "Number of items in the trail of recently visited items"),
+
+        ('item_views', [
+            # (endpointname, label, check_item_exists
+            ('frontend.show_item', L_('Show'), L_('Show'), False, ),
+            ('frontend.download_item', L_('Download'), L_('Download'), True, ),
+            ('frontend.history', L_('History'), L_('Revision History'), True, ),
+            # note: when rendering a non-existing item, you'll be offered to
+            # create it (in the content area), so we do not offer "Modify":
+            ('frontend.modify_item', L_('Modify'), L_('Edit or Upload'), True, ),
+            ('special.supplementation', None, None, False, ),
+            ('frontend.index', L_('Index'), L_('List sub-items'), False, ),
+            ('special.comments', L_('Comments'), L_('Hide comments'), True, ),
+            ('special.transclusions', L_('Transclusions'), L_('Show transclusions'), True, ),
+            ('frontend.highlight_item', L_('Highlight'), L_('Show with Syntax-Highlighting'), True, ),
+            ('frontend.show_item_meta', L_('Meta'), L_('Display Metadata'), True, ),
+            ('frontend.quicklink_item', None, L_('Create or remove a navigation link to this item'), False, ),
+            ('frontend.subscribe_item', None, L_('Switch notifications about item changes on or off'), False, ),
+            ('frontend.rename_item', L_('Rename'), L_('Rename this item'), True, ),
+            ('frontend.delete_item', L_('Delete'), L_('Delete this item'), True, ),
+            ('frontend.destroy_item', L_('Destroy'), L_('Completely destroy this item'), True, ),
+            ('frontend.backrefs', L_('Referrers'), L_('What refers here?'), False, ),
+            ('frontend.sitemap', L_('Site Map'), L_('Local Site Map of this item'), True, ),
+            ('frontend.similar_names', L_('Similar'), L_('Items with similar names'), False, ),
+        ], 'list of edit bar entries (list of tuples (endpoint, label))'),
+
+        ('show_hosts', True,
+         "if True, show host names and IPs. Set to False to hide them."),
+        ('show_interwiki', False,
+         "if True, let the theme display your interwiki name"),
+        ('show_names', True,
+         "if True, show user names in the revision history and on Recent``Changes. Set to False to hide them."),
+        ('show_section_numbers', False,
+         'show section numbers in headings by default'),
+        ('show_rename_redirect', False, "if True, offer creation of redirect pages when renaming wiki pages"),
+
+        ('template_dirs', [], "list of directories with templates that will override theme and base templates."),
+    )),
+    # ==========================================================================
+    'editor': ('Editor', None, (
+        ('item_license', u'', 'if set, show the license item within the editor. [Unicode]'),
+        #('edit_locking', 'warn 10', "Editor locking policy: `None`, `'warn <timeout in minutes>'`, or `'lock <timeout in minutes>'`"),
+        ('edit_ticketing', True, None),
+    )),
+    # ==========================================================================
+    'paging': ('Paging', None, (
+        ('results_per_page', 50, "Number of results to be shown on a single page in pagination"),
+    )),
+    # ==========================================================================
+    'data': ('Data Storage', None, (
+        ('data_dir', './data/', "Path to the data directory."),
+        ('plugin_dirs', [], "Plugin directories."),
+
+        ('interwiki_map', {},
+         "Dictionary of wiki_name -> wiki_url"),
+        ('namespace_mapping', None,
+         "A list of tuples, each tuple containing: Namespace identifier, backend name. " +
+         "E.g.: [('', 'default')), ]. Please see HelpOnStorageConfiguration for further reference."),
+        ('backend_mapping', None,
+         "A dictionary that maps backend names to backends. " +
+         "E.g.: {'default': Backend(), }. Please see HelpOnStorageConfiguration for further reference."),
+        ('acl_mapping', None,
+         "This needs to point to a list of tuples, each tuple containing: name prefix, acl protection to be applied to matching items. " +
+         "E.g.: [('', dict(default='All:read,write,create')), ]. Please see HelpOnStorageConfiguration for further reference."),
+        ('create_storage', False, "Create (initialize) the storage backends before trying to use them."),
+        ('create_index', False, "Create (initialize) the index before trying to use them."),
+        ('destroy_storage', False, "Destroy (empty) the storage backends after using them."),
+        ('destroy_index', False, "Destroy (empty) the index after using it."),
+    )),
+    # ==========================================================================
+    'items': ('Special Item Names', None, (
+        ('item_root', u'Home', "Name of the root item (aka 'front page'). [Unicode]"),
+
+        # the following regexes should match the complete name when used in free text
+        # the group 'all' shall match all, while the group 'key' shall match the key only
+        # e.g. FooGroup -> group 'all' ==  FooGroup, group 'key' == Foo
+        # moin's code will add ^ / $ at beginning / end when needed
+        ('item_dict_regex', ur'(?P<all>(?P<key>\S+)Dict)',
+         'Item names exactly matching this regex are regarded as items containing variable dictionary definitions [Unicode]'),
+        ('item_group_regex', ur'(?P<all>(?P<key>\S+)Group)',
+         'Item names exactly matching this regex are regarded as items containing group definitions [Unicode]'),
+    )),
+    # ==========================================================================
+    'user': ('User Preferences', None, (
+        ('user_defaults', {
+            NAME: [],
+            DISPLAY_NAME: None,
+            EMAIL: None,
+            OPENID: None,
+            CSS_URL: None,
+            MAILTO_AUTHOR: False,
+            EDIT_ON_DOUBLECLICK: True,
+            SCROLL_PAGE_AFTER_EDIT: True,
+            SHOW_COMMENTS: False,
+            WANT_TRIVIAL: False,
+            ENC_PASSWORD: u'',  # empty value == invalid hash
+            DISABLED: False,
+            BOOKMARKS: {},
+            QUICKLINKS: [],
+            SUBSCRIBED_ITEMS: [],
+            EMAIL_SUBSCRIBED_EVENTS: [
+                # XXX PageChangedEvent.__name__
+                # XXX PageRenamedEvent.__name__
+                # XXX PageDeletedEvent.__name__
+                # XXX PageCopiedEvent.__name__
+                # XXX PageRevertedEvent.__name__
+            ],
+            THEME_NAME: None,  # None -> use cfg.theme_default
+            EDIT_ROWS: 0,
+            RESULTS_PER_PAGE: 0,
+            LOCALE: None,  # None -> do browser language detection, otherwise just use this locale
+            TIMEZONE: None,  # None -> use cfg.timezone_default
+        }, 'Default attributes of the user object'),
+    )),
+    # ==========================================================================
+    'various': ('Various', None, (
+        ('bang_meta', True, 'if True, enable {{{!NoWikiName}}} markup'),
+
+        ('config_check_enabled', False, "if True, check configuration for unknown settings."),
+
+        ('timezone_default', u'UTC', "Default time zone."),
+        ('locale_default', u'en_US', "Default locale for user interface and content."),
+
+        ('log_remote_addr', True,
+         "if True, log the remote IP address (and maybe hostname)."),
+        ('log_reverse_dns_lookups', True,
+         "if True, do a reverse DNS lookup on page SAVE. If your DNS is broken, set this to False to speed up SAVE."),
+
+        # some dangerous mimetypes (we don't use "content-disposition: inline" for them when a user
+        # downloads such data, because the browser might execute e.g. Javascript contained
+        # in the HTML and steal your moin session cookie or do other nasty stuff)
+        ('mimetypes_xss_protect', [
+            'text/html',
+            'application/x-shockwave-flash',
+            'application/xhtml+xml',
+        ], '"content-disposition: inline" is not used for downloads of such data'),
+
+        ('refresh', None, "refresh = (minimum_delay_s, targets_allowed) enables use of `#refresh 5 PageName` processing instruction, targets_allowed must be either `'internal'` or `'external'`"),
+        ('siteid', 'MoinMoin', None),  # XXX just default to some existing module name to
+                                       # make plugin loader etc. work for now
+    )),
 }
 
 #
@@ -564,45 +550,38 @@
 #
 #
 options = {
-    'acl': ('Access Control Lists',
-    'ACLs control who may do what.',
-    (
-      ('functions', u'',
-       'Access Control List for functions.'),
-      ('rights_contents', ACL_RIGHTS_CONTENTS,
-       'Valid tokens for right sides of content ACL entries.'),
-      ('rights_functions', ACL_RIGHTS_FUNCTIONS,
-       'Valid tokens for right sides of function ACL entries.'),
+    'acl': ('Access Control Lists', 'ACLs control who may do what.', (
+        ('functions', u'', 'Access Control List for functions.'),
+        ('rights_contents', ACL_RIGHTS_CONTENTS, 'Valid tokens for right sides of content ACL entries.'),
+        ('rights_functions', ACL_RIGHTS_FUNCTIONS, 'Valid tokens for right sides of function ACL entries.'),
     )),
 
     'ns': ('Storage Namespaces',
     "Storage namespaces can be defined for all sorts of data. All items sharing a common namespace as prefix" +
     "are then stored within the same backend. The common prefix for all data is ''.",
     (
-      ('content', '/', "All content is by default stored below /, hence the prefix is ''."),  # Not really necessary. Just for completeness.
-      ('user_profile', 'UserProfile/', 'User profiles (i.e. user data, not their homepage) are stored in this namespace.'),
-      ('user_homepage', 'User/', 'All user homepages are stored below this namespace.'),
+        ('content', '/', "All content is by default stored below /, hence the prefix is ''."),  # Not really necessary. Just for completeness.
+        ('user_profile', 'UserProfile/', 'User profiles (i.e. user data, not their homepage) are stored in this namespace.'),
+        ('user_homepage', 'User/', 'All user homepages are stored below this namespace.'),
     )),
 
     'user': ('User', None, (
-      ('email_unique', True,
-       "if True, check email addresses for uniqueness and don't accept duplicates."),
-      ('email_verification', False,
-       "if True, require a new user to verify his or her email address before the first login."),
+        ('email_unique', True,
+         "if True, check email addresses for uniqueness and don't accept duplicates."),
+        ('email_verification', False,
+         "if True, require a new user to verify his or her email address before the first login."),
 
-      ('homewiki', u'Self',
-       "interwiki name of the wiki where the user home pages are located [Unicode] - useful if you have ''many'' users. You could even link to nonwiki \"user pages\" if the wiki username is in the target URL."),
-      ('use_gravatar', False, "if True, gravatar.com will be used to find User's avatar")
+        ('homewiki', u'Self',
+         "interwiki name of the wiki where the user home pages are located [Unicode] - useful if you have ''many'' users. You could even link to nonwiki \"user pages\" if the wiki username is in the target URL."),
+        ('use_gravatar', False, "if True, gravatar.com will be used to find User's avatar")
     )),
 
-    'mail': ('Mail',
-        'These settings control outgoing and incoming email from and to the wiki.',
-    (
-      ('from', None, "Used as From: address for generated mail. [Unicode]"),
-      ('username', None, "Username for SMTP server authentication (None = don't use auth)."),
-      ('password', None, "Password for SMTP server authentication (None = don't use auth)."),
-      ('smarthost', None, "Address of SMTP server to use for sending mail (None = don't use SMTP server)."),
-      ('sendmail', None, "sendmail command to use for sending mail (None = don't use sendmail)"),
+    'mail': ('Mail', 'These settings control outgoing and incoming email from and to the wiki.', (
+        ('from', None, "Used as From: address for generated mail. [Unicode]"),
+        ('username', None, "Username for SMTP server authentication (None = don't use auth)."),
+        ('password', None, "Password for SMTP server authentication (None = don't use auth)."),
+        ('smarthost', None, "Address of SMTP server to use for sending mail (None = don't use SMTP server)."),
+        ('sendmail', None, "sendmail command to use for sending mail (None = don't use sendmail)"),
     )),
 }
 
--- a/MoinMoin/conftest.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/conftest.py	Mon Feb 18 00:46:53 2013 +0100
@@ -19,10 +19,11 @@
 from __future__ import absolute_import, division
 
 # exclude some directories from py.test test discovery, pathes relative to this file
-collect_ignore = ['static',  # same
-                  '../wiki',  # no tests there
-                  '../instance',  # tw likes to use this for wiki data (non-revisioned)
-                 ]
+collect_ignore = [
+    'static',  # same
+    '../wiki',  # no tests there
+    '../instance',  # tw likes to use this for wiki data (non-revisioned)
+]
 import atexit
 import os
 import sys
--- a/MoinMoin/constants/contenttypes.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/constants/contenttypes.py	Mon Feb 18 00:46:53 2013 +0100
@@ -11,9 +11,11 @@
 CHARSET = 'utf-8'
 
 # Parser to use mimetype text
-PARSER_TEXT_MIMETYPE = ('plain', 'csv', 'rst', 'docbook', 'latex', 'tex', 'html', 'css',
-                       'xml', 'python', 'perl', 'php', 'ruby', 'javascript',
-                       'cplusplus', 'java', 'pascal', 'diff', 'gettext', 'xslt', 'creole', )
+PARSER_TEXT_MIMETYPE = [
+    'plain', 'csv', 'rst', 'docbook', 'latex', 'tex', 'html', 'css',
+    'xml', 'python', 'perl', 'php', 'ruby', 'javascript',
+    'cplusplus', 'java', 'pascal', 'diff', 'gettext', 'xslt', 'creole',
+]
 
 CONTENTTYPE_USER = u'application/x.moin.userprofile'
 CONTENTTYPE_DEFAULT = u'application/octet-stream'
--- a/MoinMoin/constants/misc.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/constants/misc.py	Mon Feb 18 00:46:53 2013 +0100
@@ -23,7 +23,7 @@
     \u202E   # RLM
     """,
     re.UNICODE | re.VERBOSE
-    )
+)
 
 CLEAN_INPUT_TRANSLATION_MAP = {
     # these chars will be replaced by blanks
@@ -31,18 +31,18 @@
     ord(u'\r'): u' ',
     ord(u'\n'): u' ',
 }
-for c in u'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f' \
-          '\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f':
+for c in u'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f':
     # these chars will be removed
     CLEAN_INPUT_TRANSLATION_MAP[ord(c)] = None
 del c
 
 # Other stuff
-URI_SCHEMES = ['http', 'https', 'ftp', 'file',
-               'mailto', 'nntp', 'news',
-               'ssh', 'telnet', 'irc', 'ircs', 'xmpp', 'mumble',
-               'webcal', 'ed2k', 'apt', 'rootz',
-               'gopher',
-               'notes',
-               'rtp', 'rtsp', 'rtcp',
-              ]
+URI_SCHEMES = [
+    'http', 'https', 'ftp', 'file',
+    'mailto', 'nntp', 'news',
+    'ssh', 'telnet', 'irc', 'ircs', 'xmpp', 'mumble',
+    'webcal', 'ed2k', 'apt', 'rootz',
+    'gopher',
+    'notes',
+    'rtp', 'rtsp', 'rtcp',
+]
--- a/MoinMoin/converter/_args.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_args.py	Mon Feb 18 00:46:53 2013 +0100
@@ -37,8 +37,7 @@
         return len(self.positional) + len(self.keyword)
 
     def __repr__(self):
-        return '<{0}({1!r}, {2!r})>'.format(self.__class__.__name__,
-                self.positional, self.keyword)
+        return '<{0}({1!r}, {2!r})>'.format(self.__class__.__name__, self.positional, self.keyword)
 
     def items(self):
         """
--- a/MoinMoin/converter/_tests/test__args_wiki.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test__args_wiki.py	Mon Feb 18 00:46:53 2013 +0100
@@ -11,19 +11,19 @@
 
 def test():
     yield (do,
-        ur'both positional both=foo keyword=bar',
-        [u'both', u'positional'],
-        {u'both': u'foo', u'keyword': u'bar'})
+           ur'both positional both=foo keyword=bar',
+           [u'both', u'positional'],
+           {u'both': u'foo', u'keyword': u'bar'})
 
     yield (do,
-        ur'a-b a_b a-c=foo a_c=bar',
-        [u'a-b', u'a_b'],
-        {u'a-c': u'foo', u'a_c': u'bar'})
+           ur'a-b a_b a-c=foo a_c=bar',
+           [u'a-b', u'a_b'],
+           {u'a-c': u'foo', u'a_c': u'bar'})
 
     yield (do,
-        ur'''"a b\tc\nd" k="a b\tc\nd"''',
-        [u'a b\tc\nd'],
-        {u'k': u'a b\tc\nd'})
+           ur'''"a b\tc\nd" k="a b\tc\nd"''',
+           [u'a b\tc\nd'],
+           {u'k': u'a b\tc\nd'})
 
 
 def test_parse():
--- a/MoinMoin/converter/_tests/test_creole_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_creole_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -221,15 +221,15 @@
                 '<page><body><p><code>nowiki</code> <code>nowiki</code></p></body></page>'),
             # XXX: Is <page> correct?
             (u'{{{\n#!\nwiki\n}}}',
-               '<page><body><page><body><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body><p>wiki</p></body></page></body></page>'),
             (u'{{{\n#!(style="background-color: red")\nwiki\n}}}',
-               '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
             (u'{{{\n#!creole\nwiki\n}}}',
-               '<page><body><page><body><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body><p>wiki</p></body></page></body></page>'),
             (u'{{{\n#!creole(style="background-color: red")\nwiki\n}}}',
-               '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
             (u'{{{\n#!text/plain\ntext\n}}}',
-               u'<page><body><part content-type="text/plain"><body>text</body></part></body></page>'),
+                u'<page><body><part content-type="text/plain"><body>text</body></part></body></page>'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -75,37 +75,37 @@
     def test_base(self):
         data = [
             ('<article><para>Test</para></article>',
-              # <page><body><div html:class="db-article"><p>Test</p></div></body></page>
-             '/page/body/div[@html:class="db-article"][p="Test"]'),
+                # <page><body><div html:class="db-article"><p>Test</p></div></body></page>
+                '/page/body/div[@html:class="db-article"][p="Test"]'),
             ('<article><simpara>Test</simpara></article>',
-            # <page><body><div html:class="article"><p>Test</p></div></body></page>
-             '/page/body/div[p="Test"]'),
+                # <page><body><div html:class="article"><p>Test</p></div></body></page>
+                '/page/body/div[p="Test"]'),
             ('<article><formalpara><title>Title</title><para>Test</para></formalpara></article>',
-            # <page><body><div html:class="article"><p html:title="Title">Test</p></div></body></page>
-            '/page/body/div/p[text()="Test"][@html:title="Title"]'),
+                # <page><body><div html:class="article"><p html:title="Title">Test</p></div></body></page>
+                '/page/body/div/p[text()="Test"][@html:title="Title"]'),
             ('<article><sect1><title>Heading 1</title> <para>First Paragraph</para></sect1></article>',
-            # <page><body><div html:class="article"><h outline-level="1">Heading 1</h><p>First Paragraph</p></div></body></page>
-             '/page/body/div[./h[@outline-level="1"][text()="Heading 1"]][./p[text()="First Paragraph"]]'),
+                # <page><body><div html:class="article"><h outline-level="1">Heading 1</h><p>First Paragraph</p></div></body></page>
+                '/page/body/div[./h[@outline-level="1"][text()="Heading 1"]][./p[text()="First Paragraph"]]'),
             # Test for conversion with unicode char
             (u'<article><para>안녕 유빈</para></article>',
-            # <page><body><div html:class="article"><p>안녕 유빈</p></div></body></page>
-             u'/page/body/div[p="안녕 유빈"]'),
+                # <page><body><div html:class="article"><p>안녕 유빈</p></div></body></page>
+                u'/page/body/div[p="안녕 유빈"]'),
             # Ignored tags
             ('<article><info><title>Title</title><author>Author</author></info><para>text</para></article>',
-            # <page><body><div html:class="article"><p>text</p></div></body></page>
-            '/page/body/div[p="text"]'),
+                # <page><body><div html:class="article"><p>text</p></div></body></page>
+                '/page/body/div[p="text"]'),
             # XML attributes: We support all the xml standard attributes
             ('<article><para xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</para></article>',
-            # <page><body><div html:class="article"><p xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></div></body></page>
-            '/page/body/div/p[@xml:base="http://base.tld"][@xml:id="id"][@xml:lang="en"][text()="Text"]'),
+                # <page><body><div html:class="article"><p xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></div></body></page>
+                '/page/body/div/p[@xml:base="http://base.tld"][@xml:id="id"][@xml:lang="en"][text()="Text"]'),
             # ANCHOR --> SPAN
             ('<article><para>bla bla<anchor xml:id="point_1" />bla bla</para></article>',
-            # <page><body><div html:class="article"><p>bla bla<span class="db-anchor" xml:id="point_1" />bla bla</p></div></body></page>
-            '/page/body/div/p/span[@html:class="db-anchor"][@xml:id="point_1"]'),
+                # <page><body><div html:class="article"><p>bla bla<span class="db-anchor" xml:id="point_1" />bla bla</p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-anchor"][@xml:id="point_1"]'),
             # BOOK Document
             ('<book><para>Test</para></book>',
-            # <page><body><div html:class="db-book"><p>Test</p></div></body></page>
-            '/page/body/div[@html:class="db-book"][p="Test"]'),
+                # <page><body><div html:class="db-book"><p>Test</p></div></body></page>
+                '/page/body/div[@html:class="db-book"][p="Test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -114,15 +114,15 @@
         data = [
             # Test simple numbered section conversion into headings.
             ('<article><sect1><title>Heading 1</title> <para>First</para><sect2><title>Heading 2</title><para>Second</para></sect2></sect1></article>',
-            # <page><body><table-of-content><div html:class="article"><h outline-level="1">Heading 1</h><p>First</p><h outline-level="2">Heading 2</h><p>Second</p></div></body></page>
-             '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2"]][p[2][text()="Second"]]'),
+                # <page><body><table-of-content><div html:class="article"><h outline-level="1">Heading 1</h><p>First</p><h outline-level="2">Heading 2</h><p>Second</p></div></body></page>
+                '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2"]][p[2][text()="Second"]]'),
             ('<article><section><title>Heading 1</title> <para>First</para><section><title>Heading 2</title><para>Second</para></section></section></article>',
-            # <page><body><table-of-content><div html:class="article"><h outline-level="1">Heading 1</h><p>First</p><h outline-level="2">Heading 2</h><p>Second</p></div></body></page>
-             '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2"]][p[2][text()="Second"]]'),
+                # <page><body><table-of-content><div html:class="article"><h outline-level="1">Heading 1</h><p>First</p><h outline-level="2">Heading 2</h><p>Second</p></div></body></page>
+                '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2"]][p[2][text()="Second"]]'),
             # Test complex recursive section conversion into headings.
             ('<article><section><title>Heading 1 A</title><para>First</para><section><title>Heading 2 A</title><para>Second</para><section><title>Heading 3 A</title><para>Third</para></section></section></section><section><title>Heading 1 B</title><para>Fourth</para></section></article>',
-            # <page><body><table-of-content /><div html:class="article"><h outline-level="1">Heading 1 A</h><p>First</p><h outline-level="2">Heading 2 A</h><p>Second</p><h outline-level="3">Heading 3 A</h><p>Third</p><h outline-level="1">Heading 1 B</h><p>Fourth</p></div></body></page>
-             '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1 A"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2 A"]][p[2][text()="Second"]][h[3][@outline-level="3"][text()="Heading 3 A"]][p[3][text()="Third"]][h[4][@outline-level="1"][text()="Heading 1 B"]][p[4][text()="Fourth"]]'),
+                # <page><body><table-of-content /><div html:class="article"><h outline-level="1">Heading 1 A</h><p>First</p><h outline-level="2">Heading 2 A</h><p>Second</p><h outline-level="3">Heading 3 A</h><p>Third</p><h outline-level="1">Heading 1 B</h><p>Fourth</p></div></body></page>
+                '/page/body[table-of-content]/div[h[1][@outline-level="1"][text()="Heading 1 A"]][p[1][text()="First"]][h[2][@outline-level="2"][text()="Heading 2 A"]][p[2][text()="Second"]][h[3][@outline-level="3"][text()="Heading 3 A"]][p[3][text()="Third"]][h[4][@outline-level="1"][text()="Heading 1 B"]][p[4][text()="Fourth"]]'),
         ]
 
         for i in data:
@@ -132,64 +132,63 @@
         data = [
             # ITEMIZED LIST --> unordered list
             ('<article><itemizedlist><listitem>Unordered Item 1</listitem><listitem>Unordered Item 2</listitem></itemizedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generate="unordered"><list-item><list-item-body>Unordered Item 1</list-item-body></list-item><list-item><list-item-body>Unordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Unordered Item 1"]][list-item[2]/list-item-body[text()="Unordered Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="unordered"><list-item><list-item-body>Unordered Item 1</list-item-body></list-item><list-item><list-item-body>Unordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Unordered Item 1"]][list-item[2]/list-item-body[text()="Unordered Item 2"]]'),
             # ORDERED LIST --> ordered list
             ('<article><orderedlist><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with upperalpha numeration --> ordered list with upper-alpha list-style-type
             ('<article><orderedlist numeration="upperalpha"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-
             # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="upper-alpha"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="upper-alpha"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
+                '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="upper-alpha"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with loweralpha numeration --> ordered list with lower-alpha list-style-type
             ('<article><orderedlist numeration="loweralpha"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="lower-alpha"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="lower-alpha"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="lower-alpha"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="lower-alpha"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with upperroman numeration --> ordered list with upper-roman list-style-type
             ('<article><orderedlist numeration="upperroman"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="upper-roman"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="upper-roman"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="upper-roman"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="upper-roman"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with lowerroman numeration --> ordered list with lower-roman list-style-type
             ('<article><orderedlist numeration="lowerroman"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="lower-roman"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="lower-roman"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="lower-roman"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="lower-roman"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # VARIABLE LIST --> list
             ('<article><variablelist><varlistentry><term>Term 1</term><listitem>Definition 1</listitem></varlistentry><varlistentry><term>Term 2</term><listitem>Definition 2</listitem></varlistentry></variablelist></article>',
-            # <page><body><div html:class="article"><list><list-item><list-item-label>Termm 1</list-item-label><list-item-body>Definition 1</list-item-body></list-item><list-item><list-item-label>Term 2</list-item-label><list-item-body>Definition 2</list-item-body></list-item></list></div></body></page>
-            '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body="Definition 1"]][list-item[2][list-item-label="Term 2"][list-item-body="Definition 2"]]'),
+                # <page><body><div html:class="article"><list><list-item><list-item-label>Termm 1</list-item-label><list-item-body>Definition 1</list-item-body></list-item><list-item><list-item-label>Term 2</list-item-label><list-item-body>Definition 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body="Definition 1"]][list-item[2][list-item-label="Term 2"][list-item-body="Definition 2"]]'),
             # PROCEDURE --> ordered list (with arabic numeration)
             ('<article><procedure><step>First Step</step><step>Second Step</step></procedure></article>',
-            # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body>Second Step</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list-item[2]/list-item-body[text()="Second Step"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body>Second Step</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list-item[2]/list-item-body[text()="Second Step"]]'),
             # PROCEDURE --> ordered list (with arabic numeration) (with stepalternative)
             ('<article><procedure><step>First Step</step><stepalternatives>Second Step</stepalternatives></procedure></article>',
-            # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body>Second Step</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list-item[2]/list-item-body[text()="Second Step"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body>Second Step</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list-item[2]/list-item-body[text()="Second Step"]]'),
             # PROCEDURE with SUBSTEPS
             ('<article><procedure><step>First Step</step><substeps><step>Second Step</step></substeps></procedure></article>',
-            # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body><list item-label-generate="ordered">Second Step</list-item-body></list-item></list></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list[@item-label-generate="ordered"]/list-item/list-item-body[text()="Second Step"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body>First Step</list-item-body></list-item><list-item><list-item-body><list item-label-generate="ordered">Second Step</list-item-body></list-item></list></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="First Step"]][list[@item-label-generate="ordered"]/list-item/list-item-body[text()="Second Step"]]'),
             # GLOSS LIST --> Definition list
             ('<article><glosslist><glossentry><glossterm>Term 1</glossterm><glossdef><para>Definition 1</para></glossdef></glossentry><glossentry><glossterm>Term 2</glossterm><glossdef><para>Definition 2</para></glossdef></glossentry></glosslist></article>',
-            # <page><body><div html:class="article"><list><list-item><list-item-label>Termm 1</list-item-label><list-item-body>Definition 1</list-item-body></list-item><list-item><list-item-label>Term 2</list-item-label><list-item-body>Definition 2</list-item-body></list-item></list></div></body></page>
-            '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body[p="Definition 1"]]][list-item[2][list-item-label="Term 2"][list-item-body[p="Definition 2"]]]'),
+                # <page><body><div html:class="article"><list><list-item><list-item-label>Termm 1</list-item-label><list-item-body>Definition 1</list-item-body></list-item><list-item><list-item-label>Term 2</list-item-label><list-item-body>Definition 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body[p="Definition 1"]]][list-item[2][list-item-label="Term 2"][list-item-body[p="Definition 2"]]]'),
             # SEGMENTED LIST --> Definition List
             ('<article><segmentedlist><segtitle>Term 1</segtitle><segtitle>Term 2</segtitle><segtitle>Term 3</segtitle><seglistitem><seg>Def 1:1</seg><seg>Def 1:2</seg><seg>Def 1:3</seg></seglistitem><seglistitem><seg>Def 2:1</seg><seg>Def 2:2</seg><seg>Def 2:3</seg></seglistitem></segmentedlist></article>',
-              '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body="Def 1:1"]][list-item[2][list-item-label="Term 2"][list-item-body="Def 1:2"]][list-item[3][list-item-label="Term 3"][list-item-body="Def 1:3"]][list-item[4][list-item-label="Term 1"][list-item-body="Def 2:1"]][list-item[5][list-item-label="Term 2"][list-item-body="Def 2:2"]][list-item[6][list-item-label="Term 3"][list-item-body="Def 2:3"]]'),
+                '/page/body/div/list[list-item[1][list-item-label="Term 1"][list-item-body="Def 1:1"]][list-item[2][list-item-label="Term 2"][list-item-body="Def 1:2"]][list-item[3][list-item-label="Term 3"][list-item-body="Def 1:3"]][list-item[4][list-item-label="Term 1"][list-item-body="Def 2:1"]][list-item[5][list-item-label="Term 2"][list-item-body="Def 2:2"]][list-item[6][list-item-label="Term 3"][list-item-body="Def 2:3"]]'),
             # SIMPLE LIST --> unordered list
             ('<article><simplelist><member>Item 1</member><member>Item 2</member></simplelist></article>',
-            # <page><body><div html:class="article"><list item-label-generate="unordered"><list-item><list-item-body>Unordered Item 1</list-item-body></list-item><list-item><list-item-body>Unordered Item 2</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Item 1"]][list-item[2]/list-item-body[text()="Item 2"]]'),
+                # <page><body><div html:class="article"><list item-label-generate="unordered"><list-item><list-item-body>Unordered Item 1</list-item-body></list-item><list-item><list-item-body>Unordered Item 2</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Item 1"]][list-item[2]/list-item-body[text()="Item 2"]]'),
             # Q and A set with defaultlabel = number --> ordered list
             ("<article><qandaset defaultlabel='number'><qandaentry><question><para>Question 1</para></question><answer><para>Answer 1</para></answer></qandaentry><qandaentry><question><para>Question 2</para></question><answer><para>Answer 2</para></answer></qandaentry></qandaset></article> ",
-            # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body><p>Question1</p><p>Answer 1</p></list-item-body></list-item><list-item><list-item-body><p>Question 2</p><p>Answer 2</p></list-item-body></list-item></div></body></page>
-             '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[p[1][text()="Question 1"]][p[2][text()="Answer 1"]]][list-item[2]/list-item-body[p[1][text()="Question 2"]][p[2][text()="Answer 2"]]]'),
+                # <page><body><div html:class="article"><list item-label-generate="ordered"><list-item><list-item-body><p>Question1</p><p>Answer 1</p></list-item-body></list-item><list-item><list-item-body><p>Question 2</p><p>Answer 2</p></list-item-body></list-item></div></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[p[1][text()="Question 1"]][p[2][text()="Answer 1"]]][list-item[2]/list-item-body[p[1][text()="Question 2"]][p[2][text()="Answer 2"]]]'),
             # Q and A set with defaultlabel = qanda --> definition list, with Q: and A: for the label
             ("<article><qandaset defaultlabel='qanda'><qandaentry><question><para>Question 1</para></question><answer><para>Answer 1</para></answer></qandaentry><qandaentry><question><para>Question 2</para></question><answer><para>Answer 2</para></answer></qandaentry></qandaset></article> ",
-            # <page><body><div html:class="article"><list><list-item><list-item-label>Q: </list-item-label><list-item-body>Question 1</list-item-body></list-item><list-item><list-item-label>A: </list-item-label><list-item-body>Answer 1</list-item-body></list-item><list-item><list-item-label>Q: </list-item-label><list-item-body>Question 2</list-item-body></list-item><list-item><list-item-label>A: </list-item-label><list-item-body>Answer 2</list-item-body></list-item>
-              '/page/body/div/list[list-item[1][list-item-label="Q:"][list-item-body="Question 1"]][list-item[2][list-item-label="A:"][list-item-body="Answer 1"]][list-item[3][list-item-label="Q:"][list-item-body="Question 2"]][list-item[4][list-item-label="A:"][list-item-body="Answer 2"]]'),
+                # <page><body><div html:class="article"><list><list-item><list-item-label>Q: </list-item-label><list-item-body>Question 1</list-item-body></list-item><list-item><list-item-label>A: </list-item-label><list-item-body>Answer 1</list-item-body></list-item><list-item><list-item-label>Q: </list-item-label><list-item-body>Question 2</list-item-body></list-item><list-item><list-item-label>A: </list-item-label><list-item-body>Answer 2</list-item-body></list-item>
+                '/page/body/div/list[list-item[1][list-item-label="Q:"][list-item-body="Question 1"]][list-item[2][list-item-label="A:"][list-item-body="Answer 1"]][list-item[3][list-item-label="Q:"][list-item-body="Question 2"]][list-item[4][list-item-label="A:"][list-item-body="Answer 2"]]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -197,22 +196,22 @@
     def test_table(self):
         data = [
             ('<article><table><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table></article>',
-            # <page><body><div html:class="article"><table><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-row></table-cell></table></div></body></page>
-             '/page/body/div/table[./table-header/table-row[table-cell="Header"]][./table-footer/table-row[table-cell="Footer"]][./table-body/table-row[table-cell="Cell"]]'),
+                # <page><body><div html:class="article"><table><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-row></table-cell></table></div></body></page>
+                '/page/body/div/table[./table-header/table-row[table-cell="Header"]][./table-footer/table-row[table-cell="Footer"]][./table-body/table-row[table-cell="Cell"]]'),
             ('<article><table><tbody><tr><td colspan="2">Cell</td></tr></tbody></table></article>',
-            # <page><body><div html:class="article"><table><table-body><table-row><table-cell number-columns-spanned="2">Cell</table-cell></table-row></table-body></table></div></body></page>
-             '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-columns-spanned="2"]'),
+                # <page><body><div html:class="article"><table><table-body><table-row><table-cell number-columns-spanned="2">Cell</table-cell></table-row></table-body></table></div></body></page>
+                '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-columns-spanned="2"]'),
             ('<article><table><tbody><tr><td rowspan="2">Cell</td></tr></tbody></table></article>',
-            # <page><body><div html:class="article"><table><table-body><table-row><table-cell number-rows-spanned="2">Cell</table-cell></table-row></table-body></table></div></body></page>
-             '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-rows-spanned="2"]'),
+                # <page><body><div html:class="article"><table><table-body><table-row><table-cell number-rows-spanned="2">Cell</table-cell></table-row></table-body></table></div></body></page>
+                '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-rows-spanned="2"]'),
             # Simple db.cals.table
             ('<article><table xml:id="ex.calstable"><tgroup cols="2"><thead><row><entry>a1</entry><entry>a2</entry></row></thead><tfoot><row><entry>f1</entry><entry>f2</entry></row></tfoot><tbody><row><entry>b1</entry><entry>b2</entry></row></tbody></tgroup></table></article>',
-            # <page><body><div html:class="article"><table><table-header><table-row><table-cell>a1</table-cell><table-cell>a2</table-cell></table-row></table-header><table-footer><table-row><table-cell>f1</table-cell><table-cell>f2</table-cell></table-row></table-footer><table-body><table-row><table-cell>b1</table-row><table-cell>b2</table-row></table-cell></table></div></body></page>
-             '/page/body/div/table[./table-header/table-row[table-cell="a1"][table-cell="a2"]][./table-footer/table-row[table-cell="f1"][table-cell="f2"]][./table-body/table-row[table-cell="b1"][table-cell="b2"]]'),
+                # <page><body><div html:class="article"><table><table-header><table-row><table-cell>a1</table-cell><table-cell>a2</table-cell></table-row></table-header><table-footer><table-row><table-cell>f1</table-cell><table-cell>f2</table-cell></table-row></table-footer><table-body><table-row><table-cell>b1</table-row><table-cell>b2</table-row></table-cell></table></div></body></page>
+                '/page/body/div/table[./table-header/table-row[table-cell="a1"][table-cell="a2"]][./table-footer/table-row[table-cell="f1"][table-cell="f2"]][./table-body/table-row[table-cell="b1"][table-cell="b2"]]'),
             # db.cals.table with entry table.
             ('<article><table xml:id="ex.calstable"><tgroup cols="1"><thead><row><entry>a1</entry></row></thead><tfoot><row><entry>f1</entry></row></tfoot><tbody><row><entrytbl cols="1"><tbody><row><entry>s1</entry></row></tbody></entrytbl></row></tbody></tgroup></table></article>',
-            # <page><body><div html:class="article"><table><table-header><table-row><table-cell>a1</table-cell></table-row></table-header><table-footer><table-row><table-cell>f1</table-cell></table-row></table-footer><table-body><table-row><table-cell><table><table-body><table-row><table-cell>s1</table-cell></table-row></table-body></table></table-row></table-cell></table></div></body></page>
-             '/page/body/div/table[./table-header/table-row[table-cell="a1"]][./table-footer/table-row[table-cell="f1"]][./table-body/table-row[table-cell/table/table-body/table-row[table-cell="s1"]]]'),
+                # <page><body><div html:class="article"><table><table-header><table-row><table-cell>a1</table-cell></table-row></table-header><table-footer><table-row><table-cell>f1</table-cell></table-row></table-footer><table-body><table-row><table-cell><table><table-body><table-row><table-cell>s1</table-cell></table-row></table-body></table></table-row></table-cell></table></div></body></page>
+                '/page/body/div/table[./table-header/table-row[table-cell="a1"]][./table-footer/table-row[table-cell="f1"]][./table-body/table-row[table-cell/table/table-body/table-row[table-cell="s1"]]]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -220,39 +219,39 @@
     def test_misc(self):
         data = [
             ('<article><para>Text Para<footnote><para>Text Footnote</para></footnote></para></article>',
-            # <page><body><div html:class="article"><p>Text Para<note note-class="footnote"><note-body><p>Text Footnote</p></note-body></note></p></div></body></page>
-             '/page/body/div/p[text()="Text Para"]/note[@note-class="footnote"]/note-body/p[text()="Text Footnote"]'),
+                # <page><body><div html:class="article"><p>Text Para<note note-class="footnote"><note-body><p>Text Footnote</p></note-body></note></p></div></body></page>
+                '/page/body/div/p[text()="Text Para"]/note[@note-class="footnote"]/note-body/p[text()="Text Footnote"]'),
             ('<article><para><quote>text</quote></para></article>',
-            # <page><body><div html:class="article"><p><quote>text</quote></para></article>
-            '/page/body/div/p[quote="text"]'),
+                # <page><body><div html:class="article"><p><quote>text</quote></para></article>
+                '/page/body/div/p[quote="text"]'),
             # Test span for inline element
             ('<article><para><abbrev>ABBREV</abbrev></para></article>',
-            # <page><body><div html:class="article"><p><span class="db-abbrev">ABBREV</span></p></div></body></page>
-             '/page/body/div/p/span[@html:class="db-abbrev"][text()="ABBREV"]'),
+                # <page><body><div html:class="article"><p><span class="db-abbrev">ABBREV</span></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-abbrev"][text()="ABBREV"]'),
             # Test div for block element
             ('<article><acknowledgements><para>Text</para></acknowledgements></article>',
-            # <page><body><div html:class="article"><div html:class="db-acknowledgements"><p>Text</p></div></div></body></page>
-            '/page/body/div/div[@html:class="db-acknowledgements"][p="Text"]'),
+                # <page><body><div html:class="article"><div html:class="db-acknowledgements"><p>Text</p></div></div></body></page>
+                '/page/body/div/div[@html:class="db-acknowledgements"][p="Text"]'),
             # Test for <informalequation>
             ('<article><informalequation><para>E = mc^2</para></informalequation></article>',
-            # <page><body><div html:class="article"><div html:class="db-equation"><p>E = mc^2</p></div></div></body></page>
-             '/page/body/div/div[@html:class="db-equation"][p="E = mc^2"]'),
+                # <page><body><div html:class="article"><div html:class="db-equation"><p>E = mc^2</p></div></div></body></page>
+                '/page/body/div/div[@html:class="db-equation"][p="E = mc^2"]'),
             # Test for <informalexample>
             ('<article><informalexample><para>example</para></informalexample></article>',
-            # <page><body><div html:class="article"><div html:class="db-example"><p>example</p></div></div></body></page>
-             '/page/body/div/div[@html:class="db-example"][p="example"]'),
+                # <page><body><div html:class="article"><div html:class="db-example"><p>example</p></div></div></body></page>
+                '/page/body/div/div[@html:class="db-example"][p="example"]'),
             # Test for <sbr />
             ('<article><cmdsynopsis><para>Line 1<sbr />Line 2</para></cmdsynopsis></article>',
-            # <page><body><div html:class="article"><div html:class="db-cmdsynopsis"><p>Line 1<line-break />Line 2</p></div></div></body></page>
-            '/page/body/div/div[@html:class="db-cmdsynopsis"]/p/line-break'),
+                # <page><body><div html:class="article"><div html:class="db-cmdsynopsis"><p>Line 1<line-break />Line 2</p></div></div></body></page>
+                '/page/body/div/div[@html:class="db-cmdsynopsis"]/p/line-break'),
             # Test for <tag> element with class and namespace attribute
             ('<article><para><tag class="attribute" namespace="namespace">TAG</tag></para></article>',
-            # <page><body><div html:class="article"><p><span class="db-tag-attribute">{namespace}TAG</span></p></div></article>
-            '/page/body/div/p/span[@html:class="db-tag-attribute"][text()="{namespace}TAG"]'),
+                # <page><body><div html:class="article"><p><span class="db-tag-attribute">{namespace}TAG</span></p></div></article>
+                '/page/body/div/p/span[@html:class="db-tag-attribute"][text()="{namespace}TAG"]'),
             # Test for <tag> element without class and namespace attribute
             ('<article><para><tag>TAG</tag></para></article>',
-            # <page><body><div html:class="article"><p><span class="db-tag">TAG</span></p></div></article>
-            '/page/body/div/p/span[@html:class="db-tag"][text()="TAG"]'),
+                # <page><body><div html:class="article"><p><span class="db-tag">TAG</span></p></div></article>
+                '/page/body/div/p/span[@html:class="db-tag"][text()="TAG"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -261,24 +260,24 @@
         data = [
             # Normal link, with conversion of all the xlink attributes
             ('<article><para><link xlink:href="uri:test" xlink:title="title">link</link></para></article>',
-            # <page><body><div html:class="article"><p><a xlink:href="uri:test" xlink:title="title">link</a></p></div></body></page>
-             '/page/body/div/p/a[@xlink:href="uri:test"][@xlink:title="title"][text()="link"]'),
+                # <page><body><div html:class="article"><p><a xlink:href="uri:test" xlink:title="title">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="uri:test"][@xlink:title="title"][text()="link"]'),
             # Old link from DocBook v.4.X for backward compatibility
             ('<article><para><ulink url="url:test">link</ulink></para></article>',
-            # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
-             '/page/body/div/p/a[@xlink:href="url:test"][text()="link"]'),
+                # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="url:test"][text()="link"]'),
             # Normal link, with linkend attribute
             ('<article><para><link linkend="anchor">link</link></para></article>',
-            # <page><body><div html:class="article"><p><a xlink:href="#anchor">link</a></p></div></body></page>
-             '/page/body/div/p/a[@xlink:href="#anchor"][text()="link"]'),
+                # <page><body><div html:class="article"><p><a xlink:href="#anchor">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="#anchor"][text()="link"]'),
             # OLINK
             ('<article><para><olink targetdoc="uri" targetptr="anchor">link</olink></para></article>',
-            # <page><body><div html:class="article"><para><a xlink:href="uri#anchor">link</a></para></div></body></page>
-             '/page/body/div/p/a[@xlink:href="uri#anchor"][text()="link"]'),
+                # <page><body><div html:class="article"><para><a xlink:href="uri#anchor">link</a></para></div></body></page>
+                '/page/body/div/p/a[@xlink:href="uri#anchor"][text()="link"]'),
             # Link w/ javascript: scheme
             ('<article><para><ulink url="javascript:alert(\'xss\')">link</ulink></para></article>',
-            # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
-             '/page/body/div/p/a[@xlink:href=""][text()="link"]'),
+                # <page><body><div html:class="article"><p><a xlink:href="url:test">link</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href=""][text()="link"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -286,39 +285,39 @@
     def test_code(self):
         data = [
             ('<article><screen>Text</screen></article>',
-            # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
-             '/page/body/div[blockcode="Text"]'),
+                # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
+                '/page/body/div[blockcode="Text"]'),
             # Test for <screen> with CDATA
             ('<article><screen><![CDATA[Text]]></screen></article>',
-            # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
-             '/page/body/div[blockcode="Text"]'),
+                # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
+                '/page/body/div[blockcode="Text"]'),
             # PROGRAMLISTING --> BLOCKCODE
             ('<article><programlisting>Text</programlisting></article>',
-            # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
-             '/page/body/div[blockcode="Text"]'),
+                # <page><body><div html:class="article"><blockcode>Text</blockcode></div></body></page>
+                '/page/body/div[blockcode="Text"]'),
             # LITERAL --> CODE
             ('<article><para>text<literal>literal</literal></para></article>',
-            # <page><body><div html:class="article"><p>text<code>literal</code></p></div></body></page>
-             '/page/body/div/p[text()="text"][code="literal"]'),
+                # <page><body><div html:class="article"><p>text<code>literal</code></p></div></body></page>
+                '/page/body/div/p[text()="text"][code="literal"]'),
             ('<article><blockquote><attribution>author</attribution>text</blockquote></article>',
-            # <page><body><div html:class="article"><blockquote source="author">text</blockquote></div></body></page>
-            '/page/body/div/blockquote[@source="author"][text()="text"]'),
+                # <page><body><div html:class="article"><blockquote source="author">text</blockquote></div></body></page>
+                '/page/body/div/blockquote[@source="author"][text()="text"]'),
             # CODE --> CODE
             ('<article><para><code>Text</code></para></article>',
-            # <page><body><div html:class="article"><p><code>Text</code></p></article>
-            '/page/body/div/p[code="Text"]'),
+                # <page><body><div html:class="article"><p><code>Text</code></p></article>
+                '/page/body/div/p[code="Text"]'),
             # COMPUTEROUTPUT --> CODE
             ('<article><para><computeroutput>Text</computeroutput></para></article>',
-            # <page><body><div html:class="article"><p><code>Text</code></p></article>
-            '/page/body/div/p[code="Text"]'),
+                # <page><body><div html:class="article"><p><code>Text</code></p></article>
+                '/page/body/div/p[code="Text"]'),
             # MARKUP --> CODE
             ('<article><para><markup>Text</markup></para></article>',
-            # <page><body><div html:class="article"><p><code>Text</code></p></article>
-            '/page/body/div/p[code="Text"]'),
+                # <page><body><div html:class="article"><p><code>Text</code></p></article>
+                '/page/body/div/p[code="Text"]'),
             # LITERALLAYOUT --> BLOCKCODE
             ('<article><literallayout>Text</literallayout></article>',
-             # <page><body><div html:class="article"><blockcode html:class="db-literallayout">Text</blockcode></div></body></page>
-             '/page/body/div/blockcode[text()="Text"][@html:class="db-literallayout"]'),
+                # <page><body><div html:class="article"><blockcode html:class="db-literallayout">Text</blockcode></div></body></page>
+                '/page/body/div/blockcode[text()="Text"][@html:class="db-literallayout"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -327,20 +326,20 @@
         data = [
             # Test for image object
             ('<article><para><inlinemediaobject><imageobject><imagedata fileref="test.png"/></imageobject></inlinemediaobject></para></article>',
-            # <page><body><div html:class="article"><p><object xlink:href="test.png" type='image/' /></p></div></body></page>
-            '/page/body/div/p/span[@html:class="db-inlinemediaobject"]/object[@xlink:href="test.png"][@type="image/"]'),
+                # <page><body><div html:class="article"><p><object xlink:href="test.png" type='image/' /></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-inlinemediaobject"]/object[@xlink:href="test.png"][@type="image/"]'),
             # Test for audio object
             ('<article><para><inlinemediaobject><audioobject><audiodata fileref="test.wav"/></audioobject></inlinemediaobject></para></article>',
-            # <page><body><div html:class="article"><p><object xlink:href="test.wav" type='audio/' /></p></div></body></page>
-            '/page/body/div/p/span[@html:class="db-inlinemediaobject"]/object[@xlink:href="test.wav"][@type="audio/"]'),
+                # <page><body><div html:class="article"><p><object xlink:href="test.wav" type='audio/' /></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-inlinemediaobject"]/object[@xlink:href="test.wav"][@type="audio/"]'),
             # Test for video object
             ('<article><para><mediaobject><videoobject><videodata fileref="test.avi"/></videoobject></mediaobject></para></article>',
-            # <page><body><div html:class="article"><p><object xlink:href="test.avi" type='video/' /></p></div></body></page>
-             '/page/body/div/p/div[@html:class="db-mediaobject"]/object[@xlink:href="test.avi"][@type="video/"]'),
+                # <page><body><div html:class="article"><p><object xlink:href="test.avi" type='video/' /></p></div></body></page>
+                '/page/body/div/p/div[@html:class="db-mediaobject"]/object[@xlink:href="test.avi"][@type="video/"]'),
             # Test for image object with different imagedata
             ('<article><mediaobject><imageobject><imagedata fileref="figures/eiffeltower.eps" format="EPS"/></imageobject><imageobject><imagedata fileref="figures/eiffeltower.png" format="PNG"/></imageobject><textobject><phrase>The Eiffel Tower</phrase> </textobject><caption><para>Designed by Gustave Eiffel in 1889, The Eiffel Tower is one of the most widely recognized buildings in the world.</para>  </caption></mediaobject></article>',
-            # <page><body><div html:class="article"><div html:class="db-mediaobject"><object xlink:href="figures/eiffeltowe.png" /></div></div></body></page>
-            '/page/body/div/div[@html:class="db-mediaobject"]/object[@xlink:href="figures/eiffeltower.png"][@type="image/png"]'),
+                # <page><body><div html:class="article"><div html:class="db-mediaobject"><object xlink:href="figures/eiffeltowe.png" /></div></div></body></page>
+                '/page/body/div/div[@html:class="db-mediaobject"]/object[@xlink:href="figures/eiffeltower.png"][@type="image/png"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -349,24 +348,24 @@
         data = [
             # EMPHASIS --> EMPHASIS
             ('<article><para>text<emphasis>emphasis</emphasis></para></article>',
-            # <page><body><div html:class="article"><p>text<emphasis>emphasis</emphasis></p></div></body></page>
-             '/page/body/div/p[text()="text"][emphasis="emphasis"]'),
+                # <page><body><div html:class="article"><p>text<emphasis>emphasis</emphasis></p></div></body></page>
+                '/page/body/div/p[text()="text"][emphasis="emphasis"]'),
             # EMPHASIS role='strong' --> STRONG
             ('<article><para>text<emphasis role="strong">strong</emphasis></para></article>',
-            # <page><body><div html:class="article"><p>text<strong>strong</strong></p></div></body></page>
-             '/page/body/div/p[text()="text"][strong="strong"]'),
+                # <page><body><div html:class="article"><p>text<strong>strong</strong></p></div></body></page>
+                '/page/body/div/p[text()="text"][strong="strong"]'),
             # SUBSCRIPT --> SPAN baseline-shift = 'sub'
             ('<article><para><subscript>sub</subscript>script</para></article>',
-            # <page><body><div html:class="article"><p>script<span baseline-shift="sub">sub</span></p></div></body></page>
-             '/page/body/div/p[text()="script"]/span[@baseline-shift="sub"][text()="sub"]'),
+                # <page><body><div html:class="article"><p>script<span baseline-shift="sub">sub</span></p></div></body></page>
+                '/page/body/div/p[text()="script"]/span[@baseline-shift="sub"][text()="sub"]'),
             # SUPERSCRIPT --> SPAN baseline-shift = 'super'
             ('<article><para><superscript>super</superscript>script</para></article>',
-            # <page><body><div html:class="article"><p>script<span baseline-shift="super">super</span></p></div></body></page>
-             '/page/body/div/p[text()="script"]/span[@baseline-shift="super"][text()="super"]'),
+                # <page><body><div html:class="article"><p>script<span baseline-shift="super">super</span></p></div></body></page>
+                '/page/body/div/p[text()="script"]/span[@baseline-shift="super"][text()="super"]'),
             # PHRASE --> SPAN
             ('<article><para><phrase>text</phrase></para></article>',
-            # <page><body><div html:class="article"><p><span>text</span></p></div></body></page>
-             '/page/body/div/p[span="text"]'),
+                # <page><body><div html:class="article"><p><span>text</span></p></div></body></page>
+                '/page/body/div/p[span="text"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -375,24 +374,24 @@
         data = [
             # Test for caution admonition
             ('<article><caution><para>text</para></caution></article>',
-            # <page><body><div html:class="article"><admonition type='caution'><p>text<p></admonition></div></body></page>
-            '/page/body/div/admonition[@type="caution"][p="text"]'),
+                # <page><body><div html:class="article"><admonition type='caution'><p>text<p></admonition></div></body></page>
+                '/page/body/div/admonition[@type="caution"][p="text"]'),
             # Test for important admonition
             ('<article><important><para>text</para></important></article>',
-            # <page><body><div html:class="article"><admonition type='important'><p>text<p></admonition></div></body></page>
-            '/page/body/div/admonition[@type="important"][p="text"]'),
+                # <page><body><div html:class="article"><admonition type='important'><p>text<p></admonition></div></body></page>
+                '/page/body/div/admonition[@type="important"][p="text"]'),
             # Test for note admonition
             ('<article><note><para>text</para></note></article>',
-            # <page><body><div html:class="article"><admonition type='note'><p>text<p></admonition></div></body></page>
-            '/page/body/div/admonition[@type="note"][p="text"]'),
+                # <page><body><div html:class="article"><admonition type='note'><p>text<p></admonition></div></body></page>
+                '/page/body/div/admonition[@type="note"][p="text"]'),
             # Test for tip admonition
             ('<article><tip><para>text</para></tip></article>',
-            # <page><body><div html:class="article"><admonition type='tip'><p>text<p></admonition></div></body></page>
-            '/page/body/div/admonition[@type="tip"][p="text"]'),
+                # <page><body><div html:class="article"><admonition type='tip'><p>text<p></admonition></div></body></page>
+                '/page/body/div/admonition[@type="tip"][p="text"]'),
             # Test for warning admonition
             ('<article><warning><para>text</para></warning></article>',
-            # <page><body><div html:class="article"><admonition type='warning'><p>text<p></admonition></div></body></page>
-            '/page/body/div/admonition[@type="warning"][p="text"]'),
+                # <page><body><div html:class="article"><admonition type='warning'><p>text<p></admonition></div></body></page>
+                '/page/body/div/admonition[@type="warning"][p="text"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -400,14 +399,14 @@
     def test_trademark(self):
         data = [
             ('<article><para><trademark class="copyright">MoinMoin</trademark></para></article>',
-             # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin&copy;</span></p></div></body></page>
-             '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin&copy;"]'),
+                # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin&copy;</span></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin&copy;"]'),
             ('<article><para><trademark class="service">MoinMoin</trademark></para></article>',
-             # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin<span baseline-shift="super">SM</span></span></p></div></body></page>
-             '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin"]/span[@baseline-shift="super"][text()="SM"]'),
+                # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin<span baseline-shift="super">SM</span></span></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin"]/span[@baseline-shift="super"][text()="SM"]'),
             ('<article><para><trademark>MoinMoin</trademark></para></article>',
-             # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin</span></p></div></body></page>
-             '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin"]'),
+                # <page><body><div html:class="article"><p><span class="db-trademark">MoinMoin</span></p></div></body></page>
+                '/page/body/div/p/span[@html:class="db-trademark"][text()="MoinMoin"]'),
         ]
         for i in data:
             yield(self.do, ) + i
@@ -416,10 +415,10 @@
         data = [
             # Error: Xml not correctly formatted
             ('<article><para>Text</para>',
-             '/page/body/part/error'),
+                '/page/body/part/error'),
             # Error: Root Element is not correct
             ('<link xlink:href="uri">link</link>',
-             '/page/body/part/error'),
+                '/page/body/part/error'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -428,7 +427,7 @@
         data = [
             # Error: Missing namespace
             ('<article><para>Text</para></article>',
-             '/page/body/part/error'),
+                '/page/body/part/error'),
         ]
         for i in data:
             yield (self.do_nonamespace, ) + i
--- a/MoinMoin/converter/_tests/test_docbook_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_docbook_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -64,26 +64,26 @@
 
     def test_base(self):
         data = [
-           # NB: All the output contain the <info> section, but for a better
-           #     readability, I did not wrote it in the snippet except this one
-           ('<page><body><p>Test</p></body></page>',
-            # <article><info><title>Untitled</title></info><simpara>Test</simpara></article>
-              '/article[./info[title="Untitled"]][simpara="Test"]'),
-           # ADMONITION type --> type
-           ('<page><body><admonition page:type="warning"><p>Text</p></admonition></body></page>',
-            # <article><warning><simpara>Text</simpara></warning></article>
-            '/article/warning[simpara="Text"]'),
-           # Unknown admonition
-           ('<page><body><admonition page:type="none"><p>Text</p></admonition></body></page>',
-            '/article[simpara="Text"]'),
-           # XML attributes: we support all the xml standard attributes
-           ('<page><body><p xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>',
-            # <article><simpara xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>
-            '/article/simpara[@xml:base="http://base.tld"][@xml:id="id"][@xml:lang="en"][text()="Text"]'),
-           # Para with title
-           ('<page><body><p html:title="Title">Text</p></body></page>',
-            # <article><simpara xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>
-            '/article/para[text()="Text"][title="Title"]'),
+            # NB: All the output contain the <info> section, but for a better
+            #     readability, I did not wrote it in the snippet except this one
+            ('<page><body><p>Test</p></body></page>',
+                # <article><info><title>Untitled</title></info><simpara>Test</simpara></article>
+                '/article[./info[title="Untitled"]][simpara="Test"]'),
+            # ADMONITION type --> type
+            ('<page><body><admonition page:type="warning"><p>Text</p></admonition></body></page>',
+                # <article><warning><simpara>Text</simpara></warning></article>
+                '/article/warning[simpara="Text"]'),
+            # Unknown admonition
+            ('<page><body><admonition page:type="none"><p>Text</p></admonition></body></page>',
+                '/article[simpara="Text"]'),
+            # XML attributes: we support all the xml standard attributes
+            ('<page><body><p xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>',
+                # <article><simpara xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>
+                '/article/simpara[@xml:base="http://base.tld"][@xml:id="id"][@xml:lang="en"][text()="Text"]'),
+            # Para with title
+            ('<page><body><p html:title="Title">Text</p></body></page>',
+                # <article><simpara xml:base="http://base.tld" xml:id="id" xml:lang="en">Text</p></body></page>
+                '/article/para[text()="Text"][title="Title"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -91,7 +91,7 @@
     def test_title(self):
         data = [
             ('<page><body><h page:outline-level="1">Heading 1</h><p>First</p><h page:outline-level="2">Heading 2</h><p>Second</p></body></page>',
-             '/article/sect1[title="Heading 1"][simpara="First"]/sect2[title="Heading 2"][simpara="Second"]'),
+                '/article/sect1[title="Heading 1"][simpara="First"]/sect2[title="Heading 2"][simpara="Second"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -100,32 +100,32 @@
         data = [
             # Simple unordered list
             ('<page><body><list page:item-label-generate="unordered"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><itemizedlist><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></itemizedlist></article>
-             '/article/itemizedlist[listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><itemizedlist><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></itemizedlist></article>
+                '/article/itemizedlist[listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple ordered list (use default arabic numeration)
             ('<page><body><list page:item-label-generate="ordered"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><orderedlist numeration="arabic"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
-             '/article/orderedlist[@numeration="arabic"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><orderedlist numeration="arabic"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
+                '/article/orderedlist[@numeration="arabic"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple ordered list with upper-alpha numeration
             ('<page><body><list page:item-label-generate="ordered" page:list-style-type="upper-alpha"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><orderedlist numeration="upperalpha"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
-             '/article/orderedlist[@numeration="upperalpha"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><orderedlist numeration="upperalpha"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
+                '/article/orderedlist[@numeration="upperalpha"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple ordered list with lower-alpha numeration
             ('<page><body><list page:item-label-generate="ordered" page:list-style-type="lower-alpha"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><orderedlist numeration="loweralpha"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
-             '/article/orderedlist[@numeration="loweralpha"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><orderedlist numeration="loweralpha"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
+                '/article/orderedlist[@numeration="loweralpha"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple ordered list with upper-roman numeration
             ('<page><body><list page:item-label-generate="ordered" page:list-style-type="upper-roman"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><orderedlist numeration="upperroman"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
-             '/article/orderedlist[@numeration="upperroman"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><orderedlist numeration="upperroman"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
+                '/article/orderedlist[@numeration="upperroman"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple ordered list with lower-roman numeration
             ('<page><body><list page:item-label-generate="ordered" page:list-style-type="lower-roman"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item></list></body></page>',
-             # <article><orderedlist numeration="lowerroman"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
-             '/article/orderedlist[@numeration="lowerroman"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
+                # <article><orderedlist numeration="lowerroman"><listitem><simpara>Item 1</simpara></listitem><listitem><simpara>Item 2</simpara></listitem></orderedlist></article>
+                '/article/orderedlist[@numeration="lowerroman"][listitem[1]/simpara[text()="Item 1"]][listitem[2]/simpara[text()="Item 2"]]'),
             # Simple definition list
             ('<page><body><list><list-item><list-item-label>First Term</list-item-label><list-item-body>First Definition</list-item-body></list-item><list-item><list-item-label>Second Term</list-item-label><list-item-body>Second Definition</list-item-body></list-item></list></body></page>',
-             # <article><variablelist><varlistentry><term>First Term</term><listitem><simpara>First Definition</simpara></listitem></varlistentry><varlistentry><term>Second term</term><listitem><simpara>Second Definition</simpara></listitem></varlistentry></variablelist></article>
-             '/article/variablelist[varlistentry[1][./term[text()="First Term"]][./listitem/simpara[text()="First Definition"]]][varlistentry[2][./term[text()="Second Term"]][./listitem/simpara[text()="Second Definition"]]]')
+                # <article><variablelist><varlistentry><term>First Term</term><listitem><simpara>First Definition</simpara></listitem></varlistentry><varlistentry><term>Second term</term><listitem><simpara>Second Definition</simpara></listitem></varlistentry></variablelist></article>
+                '/article/variablelist[varlistentry[1][./term[text()="First Term"]][./listitem/simpara[text()="First Definition"]]][varlistentry[2][./term[text()="Second Term"]][./listitem/simpara[text()="Second Definition"]]]')
         ]
 
         for i in data:
@@ -136,16 +136,16 @@
             # All the table output caption, just wrote a test and snippet
             # for the two first tests.
             ('<page><body><table><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-cell></table-row></table-body></table></body></page>',
-            # <article><table><caption>Table 0</caption><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table>
+                # <article><table><caption>Table 0</caption><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table>
                 '/article/table[caption="Table 0"][thead/tr[td="Header"]][tfoot/tr[td="Footer"]][tbody/tr[td="Cell"]]'),
             ('<page><body><table html:title="Title"><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-cell></table-row></table-body></table></body></page>',
-            # <article><table><caption>Title</caption><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table>
+                # <article><table><caption>Title</caption><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table>
                 '/article/table[caption="Title"][thead/tr[td="Header"]][tfoot/tr[td="Footer"]][tbody/tr[td="Cell"]]'),
             ('<page><body><table><table-body><table-row><table-cell page:number-columns-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>',
-             # <article><table><tbody><tr><td colspan="2">Cell</td></tr></tbody></table></article>
+                # <article><table><tbody><tr><td colspan="2">Cell</td></tr></tbody></table></article>
                 '/article/table/tbody/tr/td[@colspan="2"][text()="Cell"]'),
             ('<page><body><table><table-body><table-row><table-cell page:number-rows-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>',
-            # <article><table><tbody><tr><td rowspan="2">Cell</td></tr></tbody></table></article>
+                # <article><table><tbody><tr><td rowspan="2">Cell</td></tr></tbody></table></article>
                 '/article/table/tbody/tr/td[@rowspan="2"][text()="Cell"]'),
         ]
         for i in data:
@@ -155,53 +155,52 @@
         data = [
             # Footnote conversion
             ('<page><body><p>Text simpara<note page:note-class="footnote"><note-body>Text Footnote</note-body></note></p></body></page>',
-             # <article><simpara>Text simpara<footnote>Text Footnote</footnote></simpara></article>
-             '/article/simpara[text()="Text simpara"]/footnote[simpara="Text Footnote"]'),
+                # <article><simpara>Text simpara<footnote>Text Footnote</footnote></simpara></article>
+                '/article/simpara[text()="Text simpara"]/footnote[simpara="Text Footnote"]'),
             # Link conversion
             ('<page><body><p><a xlink:href="uri:test" xlink:title="title">link</a></p></body></page>',
-              # <article><simpara><link xlink:href="uri:test" xlink:title="title">link</link></simpara></article>
-              '/article/simpara/link[@xlink:href="uri:test"][@xlink:title="title"][text()="link"]'),
+                # <article><simpara><link xlink:href="uri:test" xlink:title="title">link</link></simpara></article>
+                '/article/simpara/link[@xlink:href="uri:test"][@xlink:title="title"][text()="link"]'),
             # Blockcode conversion into <screen> with CDATA
             ('<page><body><blockcode>Text</blockcode></body></page>',
-              # <article><screen><![CDATA[Text]]></screen></article>
-             '/article[screen="<![CDATA[Text]]>"]'),
+                # <article><screen><![CDATA[Text]]></screen></article>
+                '/article[screen="<![CDATA[Text]]>"]'),
             # Code conversion into <literal>
             ('<page><body><p><code>Text</code></p></body></page>',
-              # <article><simpara><literal>Text</literal></simpara></article>
-             '/article/simpara[literal="Text"]'),
+                # <article><simpara><literal>Text</literal></simpara></article>
+                '/article/simpara[literal="Text"]'),
             # SPAN --> PHRASE
             ('<page><body><p><span>Text</span></p></body></page>',
-              # <article><simpara><phrase>Text</phrase></simpara></article>
-             '/article/simpara[phrase="Text"]'),
+                # <article><simpara><phrase>Text</phrase></simpara></article>
+                '/article/simpara[phrase="Text"]'),
             # SPAN baseline-shift=sub --> subscript
             ('<page><body><p>sub<span page:baseline-shift="sub">sub</span>script</p></body></page>',
-             # <article><simpara>script<subscript>sub</subscript></simpara></article>
-             '/article/simpara[text()="script"][subscript="sub"]'),
+                # <article><simpara>script<subscript>sub</subscript></simpara></article>
+                '/article/simpara[text()="script"][subscript="sub"]'),
             # SPAN baseline-shift=super --> superscript
             ('<page><body><p>sub<span page:baseline-shift="super">super</span>script</p></body></page>',
-             # <article><simpara>script</simpara><superscript>super</superscript></article>
-             '/article/simpara[text()="script"][superscript="super"]'),
+                # <article><simpara>script</simpara><superscript>super</superscript></article>
+                '/article/simpara[text()="script"][superscript="super"]'),
             # STRONG --> EMPHASIS role='strong'
             ('<page><body><p>text<strong>strong</strong></p></body></page>',
-             # <article><simpara>text<emphasis role="strong">strong</emphasis></simpara>
-             '/article/simpara[text()="text"]/emphasis[@role="strong"][text()="strong"]'),
+                # <article><simpara>text<emphasis role="strong">strong</emphasis></simpara>
+                '/article/simpara[text()="text"]/emphasis[@role="strong"][text()="strong"]'),
             # EMPHASIS --> EMPHASIS
             ('<page><body><p>text<emphasis>emphasis</emphasis></p></body></page>',
-             # <article><simpara>text<emphasis>emphasis</emphasis></simpara>
-             '/article/simpara[text()="text"][emphasis="emphasis"]'),
+                # <article><simpara>text<emphasis>emphasis</emphasis></simpara>
+                '/article/simpara[text()="text"][emphasis="emphasis"]'),
             # LINE-BREAK --> SBR
             ('<page><body><p>Line 1<line-break />Line 2</p></body></page>',
-             #<article><simpara>Line 1<sbr />Line 2</simpara></article>
-             '/article/simpara[text()="Line 1"]/sbr'),
+                # <article><simpara>Line 1<sbr />Line 2</simpara></article>
+                '/article/simpara[text()="Line 1"]/sbr'),
             # QUOTE --> QUOTE
             ('<page><body><p>Text<quote>quotation</quote></p></body></page>',
-             # <article><simpara>Text<quote>quotation</quote></simpara></body></page>
-             '/article/simpara[text()="Text"][quote="quotation"]'),
+                # <article><simpara>Text<quote>quotation</quote></simpara></body></page>
+                '/article/simpara[text()="Text"][quote="quotation"]'),
             # BLOCKQUOTE --> BLOCKQUOTE
             ('<page><body><blockquote page:source="Socrates">One thing only I know, and that is that I know nothing.</blockquote></body></page>',
-             # <article><blockquote><attribution>Socrates</attribution><simpara>One thing ... nothing</simpara></blockquote></article>
-             '/article/blockquote[attribution="Socrates"][simpara="One thing only I know, and that is that I know nothing."]'),
-
+                # <article><blockquote><attribution>Socrates</attribution><simpara>One thing ... nothing</simpara></blockquote></article>
+                '/article/blockquote[attribution="Socrates"][simpara="One thing only I know, and that is that I know nothing."]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -209,14 +208,14 @@
     def test_object(self):
         data = [
             ('<page><body><p><object xlink:href="pics.png" page:type="image/" /></p></body></page>',
-             # <article><simpara><inlinemediaobject><imageobject><imagedata fileref="pics.png"></imageobject></inlinemediaobject></simpara></article>
-             '/article/simpara/inlinemediaobject/imageobject/imagedata[@fileref="pics.png"]'),
+                # <article><simpara><inlinemediaobject><imageobject><imagedata fileref="pics.png"></imageobject></inlinemediaobject></simpara></article>
+                '/article/simpara/inlinemediaobject/imageobject/imagedata[@fileref="pics.png"]'),
             ('<page><body><p><object xlink:href="sound.wav" page:type="audio/" /></p></body></page>',
-             # <article><simpara><inlinemediaobject><audioobject><audiodata fileref="sound.wav"></audioobject></inlinemediaobject></simpara></article>
-             '/article/simpara/inlinemediaobject/audioobject/audiodata[@fileref="sound.wav"]'),
+                # <article><simpara><inlinemediaobject><audioobject><audiodata fileref="sound.wav"></audioobject></inlinemediaobject></simpara></article>
+                '/article/simpara/inlinemediaobject/audioobject/audiodata[@fileref="sound.wav"]'),
             ('<page><body><p><object xlink:href="video.ogg" page:type="video/" /></p></body></page>',
-             # <article><simpara><inlinemediaobject><videoobject><videodata fileref="video.ogg"></videoobject></inlinemediaobject></simpara></article>
-             '/article/simpara/inlinemediaobject/videoobject/videodata[@fileref="video.ogg"]'),
+                # <article><simpara><inlinemediaobject><videoobject><videodata fileref="video.ogg"></videoobject></inlinemediaobject></simpara></article>
+                '/article/simpara/inlinemediaobject/videoobject/videodata[@fileref="video.ogg"]'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_html_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -72,12 +72,12 @@
             ('<div><p>Test</p></div>',
              # <page><body><p>Test</p></page></body>
              '/page/body[p="Test"]'),
-             # Test attributes conversion
-             ('<div><p class="class text" style="style text" title="title text">Test</p></div>',
+            # Test attributes conversion
+            ('<div><p class="class text" style="style text" title="title text">Test</p></div>',
              # <page><body><p html:class="class text" html:style="style text" html:title="title text">Test</p></body></page>
              '/page/body/p[@html:class="class text"][@html:style="style text"][@html:title="title text"][text()="Test"]'),
-             # Test id
-             ('<div><p id="first">Text<strong id="second">strong</strong></p></div>',
+            # Test id
+            ('<div><p id="first">Text<strong id="second">strong</strong></p></div>',
              # <page><body><p xml:id="first">Text<strong xml:id="second">strong</strong></p></div>
              '/page/body/p[@xml:id="first"][text()="Text"]/strong[@xml:id="second"][text()="strong"]'),
         ]
@@ -87,11 +87,11 @@
     def test_title(self):
         data = [
             ('<html><h2>Test</h2></html>',
-            # <page><body><h outline-level="2">Test</h></body></page>
-              '/page/body/h[text()="Test"][@outline-level=2]'),
+                # <page><body><h outline-level="2">Test</h></body></page>
+                '/page/body/h[text()="Test"][@outline-level=2]'),
             ('<html><h6>Test</h6></html>',
-            # <page><body><h outline-level="6">Test</h></body></page>
-              '/page/body/h[text()="Test"][@outline-level=6]'),
+                # <page><body><h outline-level="6">Test</h></body></page>
+                '/page/body/h[text()="Test"][@outline-level=6]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -99,17 +99,17 @@
     def test_basic_style(self):
         data = [
             ('<html><p><em>Test</em></p></html>',
-             # <page><body><p><emphasis>Test</emphasis></body></page>
-              '/page/body/p[emphasis="Test"]'),
+                # <page><body><p><emphasis>Test</emphasis></body></page>
+                '/page/body/p[emphasis="Test"]'),
             ('<html><p><i>Test</i></p></html>',
-             # <page><body><p><emphasis>Test</emphasis></body></page>
-              '/page/body/p[emphasis="Test"]'),
+                # <page><body><p><emphasis>Test</emphasis></body></page>
+                '/page/body/p[emphasis="Test"]'),
             ('<html><p><strong>Test</strong></p></html>',
-             # <page><body><p><strong>Test</strong></p></body></page>
-              '/page/body/p[strong="Test"]'),
+                # <page><body><p><strong>Test</strong></p></body></page>
+                '/page/body/p[strong="Test"]'),
             ('<html><p><b>Test</b></p></html>',
-             # <page><body><p><strong>Test</strong></p></body></page>
-              '/page/body/p[strong="Test"]'),
+                # <page><body><p><strong>Test</strong></p></body></page>
+                '/page/body/p[strong="Test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -117,32 +117,32 @@
     def test_span(self):
         data = [
             ('<html><p><sub>sub</sub>script</p></html>',
-             # <page><body><p><span baseline-shift="sub">sub</span></p></body></page>
-             '/page/body/p/span[text()="sub"][@baseline-shift="sub"]'),
+                # <page><body><p><span baseline-shift="sub">sub</span></p></body></page>
+                '/page/body/p/span[text()="sub"][@baseline-shift="sub"]'),
             ('<html><p><sup>super</sup>script</p></html>',
-             # <page><body><p><span baseline-shift="super">super</span></p></body></page>
-             '/page/body/p/span[text()="super"][@baseline-shift="super"]'),
+                # <page><body><p><span baseline-shift="super">super</span></p></body></page>
+                '/page/body/p/span[text()="super"][@baseline-shift="super"]'),
             ('<html><p><u>underline</u></p></html>',
-             # <page><body><p><span text-decoration="underline">underline</span></p></body></page>
-             '/page/body/p/span[text()="underline"][@text-decoration="underline"]'),
+                # <page><body><p><span text-decoration="underline">underline</span></p></body></page>
+                '/page/body/p/span[text()="underline"][@text-decoration="underline"]'),
             ('<html><p><big>Test</big></p></html>',
-             # <page><body><p><span font-size="120%">Test</span></p></body></page>
-              '/page/body/p/span[text()="Test"][@font-size="120%"]'),
+                # <page><body><p><span font-size="120%">Test</span></p></body></page>
+                '/page/body/p/span[text()="Test"][@font-size="120%"]'),
             ('<html><p><small>Test</small></p></html>',
-             # <page><body><p><span font-size="85%">Test</span></p></body></page>
-              '/page/body/p/span[text()="Test"][@font-size="85%"]'),
+                # <page><body><p><span font-size="85%">Test</span></p></body></page>
+                '/page/body/p/span[text()="Test"][@font-size="85%"]'),
             ('<html><p><ins>underline</ins></p></html>',
-             # <page><body><p><span text-decoration="underline">underline</span></p></body></page>
-             '/page/body/p/span[text()="underline"][@text-decoration="underline"]'),
+                # <page><body><p><span text-decoration="underline">underline</span></p></body></page>
+                '/page/body/p/span[text()="underline"][@text-decoration="underline"]'),
             ('<html><p><del>Test</del></p></html>',
-             # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
-             '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
+                # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
+                '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
             ('<html><p><s>Test</s></p></html>',
-             # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
-             '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
+                # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
+                '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
             ('<html><p><strike>Test</strike></p></html>',
-             # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
-             '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
+                # <page><body><p><span text-decoration="line-through">Test</span></p></body></page>
+                '/page/body/p/span[text()="Test"][@text-decoration="line-through"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -150,20 +150,20 @@
     def test_span_html_element(self):
         data = [
             ('<html><p><abbr>Text</abbr></p></html>',
-             # <page><body><span html:class="html-abbr">Text</span></body></page>
-             '/page/body/p/span[text()="Text"][@html:class="html-abbr"]'),
+                # <page><body><span html:class="html-abbr">Text</span></body></page>
+                '/page/body/p/span[text()="Text"][@html:class="html-abbr"]'),
             ('<html><p><acronym>Text</acronym></p></html>',
-             # <page><body><span html:class="html-acronym">Text</span></body></page>
-             '/page/body/p/span[text()="Text"][@html:class="html-acronym"]'),
+                # <page><body><span html:class="html-acronym">Text</span></body></page>
+                '/page/body/p/span[text()="Text"][@html:class="html-acronym"]'),
             ('<html><p><address>Text</address></p></html>',
-             # <page><body><span html:class="html-address">Text</span></body></page>
-             '/page/body/p/span[text()="Text"][@html:class="html-address"]'),
+                # <page><body><span html:class="html-address">Text</span></body></page>
+                '/page/body/p/span[text()="Text"][@html:class="html-address"]'),
             ('<html><p><dfn>Text</dfn></p></html>',
-             # <page><body><span html:class="html-dfn">Text</span></body></page>
-             '/page/body/p/span[text()="Text"][@html:class="html-dfn"]'),
+                # <page><body><span html:class="html-dfn">Text</span></body></page>
+                '/page/body/p/span[text()="Text"][@html:class="html-dfn"]'),
             ('<html><p><kbd>Text</kbd></p></html>',
-             # <page><body><span html:class="html-kbd">Text</span></body></page>
-             '/page/body/p/span[text()="Text"][@html:class="html-kbd"]'),
+                # <page><body><span html:class="html-kbd">Text</span></body></page>
+                '/page/body/p/span[text()="Text"][@html:class="html-kbd"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -171,13 +171,13 @@
     def test_link(self):
         data = [
             ('<html><p><a href="uri:test">Test</a></p></html>',
-              # <page><body><p><a xlink:href>Test</a></p></body></page>
-              '/page/body/p/a[text()="Test"][@xlink:href="uri:test"]'),
+                # <page><body><p><a xlink:href>Test</a></p></body></page>
+                '/page/body/p/a[text()="Test"][@xlink:href="uri:test"]'),
             ('<html><base href="http://www.base-url.com/" /><body><div><p><a href="myPage.html">Test</a></p></div></body></html>',
-              # <page><body><div><p><a xlink:href="http://www.base-url.com/myPage.html">Test</a></p></div></body></page>
-              '/page/body/div/p/a[@xlink:href="http://www.base-url.com/myPage.html"]'),
+                # <page><body><div><p><a xlink:href="http://www.base-url.com/myPage.html">Test</a></p></div></body></page>
+                '/page/body/div/p/a[@xlink:href="http://www.base-url.com/myPage.html"]'),
             ('<html><p><a href="javascript:alert(\'hi\')">Test</a></p></html>',
-              # <page><body><p>Test</p></body></page>
+                # <page><body><p>Test</p></body></page>
                 '/page/body/p/[text()="Test"]'),
         ]
         for i in data:
@@ -186,17 +186,17 @@
     def test_code(self):
         data = [
             ('<html><div><code>Code</code></div></html>',
-             # <page><body><div><code>Code</code></div></body></page>
-             '/page/body/div[code="Code"]'),
+                # <page><body><div><code>Code</code></div></body></page>
+                '/page/body/div[code="Code"]'),
             ('<html><div><samp>Code</samp></div></html>',
-             # <page><body><div><code>Code</code></div></body></page>
-             '/page/body/div[code="Code"]'),
+                # <page><body><div><code>Code</code></div></body></page>
+                '/page/body/div[code="Code"]'),
             ('<html><pre>Code</pre></html>',
-             # <page><body><blockcode>Code</blockcode></body></page>
-              '/page/body[blockcode="Code"]'),
+                # <page><body><blockcode>Code</blockcode></body></page>
+                '/page/body[blockcode="Code"]'),
             ('<html><p><tt>Code</tt></p></html>',
-             # <page><body><p><code>Code</code></p></body></page>
-              '/page/body/p[code="Code"]'),
+                # <page><body><p><code>Code</code></p></body></page>
+                '/page/body/p[code="Code"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -204,11 +204,11 @@
     def test_quote(self):
         data = [
             ('<html><div><p><quote>Inline quote</quote></p></div></html>',
-            # <page><body><div><p><quote>Inline quote</quote></p></body></page>
-             '/page/body/div/p[quote="Inline quote"]'),
+                # <page><body><div><p><quote>Inline quote</quote></p></body></page>
+                '/page/body/div/p[quote="Inline quote"]'),
             ('<html><div><blockquote>Block quote</blockquote></div></html>',
-            # <page><body><div><blockquote>Block quote</blockquote></body></page>
-             '/page/body/div[blockquote="Block quote"]'),
+                # <page><body><div><blockquote>Block quote</blockquote></body></page>
+                '/page/body/div[blockquote="Block quote"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -216,32 +216,32 @@
     def test_list(self):
         data = [
             ('<html><div><ul><li>Item</li></ul></div></html>',
-            # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="unordered"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="unordered"]/list-item[list-item-body="Item"]'),
             ('<html><div><ol><li>Item</li></ol></div></html>',
-            # <page><body><div><list item-label-generate="ordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="ordered"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="ordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="ordered"]/list-item[list-item-body="Item"]'),
             ('<html><div><ol type="A"><li>Item</li></ol></div></html>',
-            # <page><body><div><list item-label-generate="ordered" list-style-type="upper-alpha"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="upper-alpha"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="ordered" list-style-type="upper-alpha"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="upper-alpha"]/list-item[list-item-body="Item"]'),
             ('<html><div><ol type="I"><li>Item</li></ol></div></html>',
-            # <page><body><div><list item-label-generate="ordered" list-style-type="upper-roman"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="upper-roman"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="ordered" list-style-type="upper-roman"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="upper-roman"]/list-item[list-item-body="Item"]'),
             ('<html><div><ol type="a"><li>Item</li></ol></div></html>',
-            # <page><body><div><list item-label-generate="ordered" list-style-type="lower-alpha"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="lower-alpha"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="ordered" list-style-type="lower-alpha"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="lower-alpha"]/list-item[list-item-body="Item"]'),
             ('<html><div><ol type="i"><li>Item</li></ol></div></html>',
-            # <page><body><div><list item-label-generate="ordered" list-style-type="lower-roman"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="lower-roman"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="ordered" list-style-type="lower-roman"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="ordered" and @list-style-type="lower-roman"]/list-item[list-item-body="Item"]'),
             ('<html><div><dl><dt>Label</dt><dd>Item</dd></dl></div></html>',
-            # <page><body><div><list><list-item><list-item-label>Label</list-item-label><list-item-body>Item</list-item-body></list-item></list></div></body></page>
-             '/page/body/div/list/list-item[list-item-label="Label"][list-item-body="Item"]'),
+                # <page><body><div><list><list-item><list-item-label>Label</list-item-label><list-item-body>Item</list-item-body></list-item></list></div></body></page>
+                '/page/body/div/list/list-item[list-item-label="Label"][list-item-body="Item"]'),
             ('<html><div><dir><li>Item</li></dir></div></html>',
-            # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
-              '/page/body/div/list[@item-label-generate="unordered"]/list-item[list-item-body="Item"]'),
+                # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/div/list[@item-label-generate="unordered"]/list-item[list-item-body="Item"]'),
             ('<div><ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul></div>',
-            # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item><list-item><list-item-body>Item 3</list-item-body></list-item></list></div></page></body></page>
-             '/page/body/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Item 1"]][list-item[2]/list-item-body[text()="Item 2"]][list-item[3]/list-item-body[text()="Item 3"]]'),
+                # <page><body><div><list item-label-generate="unordered"><list-item><list-item-body>Item 1</list-item-body></list-item><list-item><list-item-body>Item 2</list-item-body></list-item><list-item><list-item-body>Item 3</list-item-body></list-item></list></div></page></body></page>
+                '/page/body/list[@item-label-generate="unordered"][list-item[1]/list-item-body[text()="Item 1"]][list-item[2]/list-item-body[text()="Item 2"]][list-item[3]/list-item-body[text()="Item 3"]]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -249,11 +249,11 @@
     def test_object(self):
         data = [
             ('<html><div><img src="uri:test" /></div></html>',
-             # <page><body><div><object xlink:href="uri:test" /></div></body></page>
-              '/page/body/div/object/@xlink:href="uri:test"'),
+                # <page><body><div><object xlink:href="uri:test" /></div></body></page>
+                '/page/body/div/object/@xlink:href="uri:test"'),
             ('<html><div><object data="href"></object></div></html>',
-             # <page><body><div><object xlink:href="href" /></div></body></page>
-              '/page/body/div/object/@xlink:href="href"'),
+                # <page><body><div><object xlink:href="href" /></div></body></page>
+                '/page/body/div/object/@xlink:href="href"'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -261,14 +261,14 @@
     def test_table(self):
         data = [
             ('<html><div><table><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table></div></html>',
-            # <page><body><div><table><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-cell></table-row></table-body></table></div></body></page>
-             '/page/body/div/table[./table-header/table-row[table-cell="Header"]][./table-footer/table-row[table-cell="Footer"]][./table-body/table-row[table-cell="Cell"]]'),
+                # <page><body><div><table><table-header><table-row><table-cell>Header</table-cell></table-row></table-header><table-footer><table-row><table-cell>Footer</table-cell></table-row></table-footer><table-body><table-row><table-cell>Cell</table-cell></table-row></table-body></table></div></body></page>
+                '/page/body/div/table[./table-header/table-row[table-cell="Header"]][./table-footer/table-row[table-cell="Footer"]][./table-body/table-row[table-cell="Cell"]]'),
             ('<html><div><table><tbody><tr><td colspan="2">Cell</td></tr></tbody></table></div></html>',
-            # <page><body><div><table><table-body><table-row><table-cell number-columns-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>
-             '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-columns-spanned="2"]'),
+                # <page><body><div><table><table-body><table-row><table-cell number-columns-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>
+                '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-columns-spanned="2"]'),
             ('<html><div><table><tbody><tr><td rowspan="2">Cell</td></tr></tbody></table></div></html>',
-            # <page><body><div><table><table-body><table-row><table-cell number-rows-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>
-             '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-rows-spanned="2"]'),
+                # <page><body><div><table><table-body><table-row><table-cell number-rows-spanned="2">Cell</table-cell></table-row></table-body></table></body></page>
+                '/page/body/div/table/table-body/table-row/table-cell[text()="Cell"][@number-rows-spanned="2"]'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_html_in_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_in_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -87,13 +87,13 @@
     def test_basic_style(self):
         data = [
             ('<html><p><em>Test</em></p></html>',
-              '/div/p[em="Test"]'),
+                '/div/p[em="Test"]'),
             ('<html><p><i>Test</i></p></html>',
-              '/div/p[em="Test"]'),
+                '/div/p[em="Test"]'),
             ('<html><p><strong>Test</strong></p></html>',
-              '/div/p[strong="Test"]'),
+                '/div/p[strong="Test"]'),
             ('<html><p><b>Test</b></p></html>',
-              '/div/p[strong="Test"]'),
+                '/div/p[strong="Test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -101,23 +101,23 @@
     def test_span(self):
         data = [
             ('<html><p><sub>sub</sub>script</p></html>',
-             '/div/p[sub="sub"]'),
+                '/div/p[sub="sub"]'),
             ('<html><p><sup>super</sup>script</p></html>',
-             '/div/p[sup="super"]'),
+                '/div/p[sup="super"]'),
             ('<html><p><u>underline</u></p></html>',
-             '/div/p[ins="underline"]'),
+                '/div/p[ins="underline"]'),
             ('<html><p><big>Test</big></p></html>',
-              '/div/p/span[@class="moin-big"][text()="Test"]'),
+                '/div/p/span[@class="moin-big"][text()="Test"]'),
             ('<html><p><small>Test</small></p></html>',
-              '/div/p/span[@class="moin-small"][text()="Test"]'),
+                '/div/p/span[@class="moin-small"][text()="Test"]'),
             ('<html><p><ins>underline</ins></p></html>',
-             '/div/p[ins="underline"]'),
+                '/div/p[ins="underline"]'),
             ('<html><p><del>Test</del></p></html>',
-             '/div/p[del="Test"]'),
+                '/div/p[del="Test"]'),
             ('<html><p><s>Test</s></p></html>',
-             '/div/p[del="Test"]'),
+                '/div/p[del="Test"]'),
             ('<html><p><strike>Test</strike></p></html>',
-             '/div/p[del="Test"]'),
+                '/div/p[del="Test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -125,15 +125,15 @@
     def test_span_html_element(self):
         data = [
             ('<html><p><abbr>Text</abbr></p></html>',
-             '/div/p/span[@class="html-abbr"][text()="Text"]'),
+                '/div/p/span[@class="html-abbr"][text()="Text"]'),
             ('<html><p><acronym>Text</acronym></p></html>',
-             '/div/p/span[@class="html-acronym"][text()="Text"]'),
+                '/div/p/span[@class="html-acronym"][text()="Text"]'),
             ('<html><p><address>Text</address></p></html>',
-             '/div/p/span[@class="html-address"][text()="Text"]'),
+                '/div/p/span[@class="html-address"][text()="Text"]'),
             ('<html><p><dfn>Text</dfn></p></html>',
-             '/div/p/span[@class="html-dfn"][text()="Text"]'),
+                '/div/p/span[@class="html-dfn"][text()="Text"]'),
             ('<html><p><kbd>Text</kbd></p></html>',
-             '/div/p/span[@class="html-kbd"][text()="Text"]'),
+                '/div/p/span[@class="html-kbd"][text()="Text"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -141,7 +141,7 @@
     def test_link(self):
         data = [
             ('<html><p><a href="uri:test">Test</a></p></html>',
-              '/div/p/a[text()="Test"][@href="uri:test"]'),
+                '/div/p/a[text()="Test"][@href="uri:test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -149,13 +149,13 @@
     def test_code(self):
         data = [
             ('<html><div><code>Code</code></div></html>',
-             '/div/div[code="Code"]'),
+                '/div/div[code="Code"]'),
             ('<html><div><samp>Code</samp></div></html>',
-             '/div/div[code="Code"]'),
+                '/div/div[code="Code"]'),
             ('<html><pre>Code</pre></html>',
-              '/div[pre="Code"]'),
+                '/div[pre="Code"]'),
             ('<html><p><tt>Code</tt></p></html>',
-              '/div/p[code="Code"]'),
+                '/div/p[code="Code"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -163,28 +163,28 @@
     def test_list(self):
         data = [
             ('<html><div><ul><li>Item</li></ul></div></html>',
-              '/div/div/ul[li="Item"]'),
+                '/div/div/ul[li="Item"]'),
             ('<html><div><ol><li>Item</li></ol></div></html>',
-              '/div/div/ol[li="Item"]'),
+                '/div/div/ol[li="Item"]'),
             ('<html><div><ol type="A"><li>Item</li></ol></div></html>',
-              '/div/div/ol[@class="moin-upperalpha-list"][li="Item"]'),
+                '/div/div/ol[@class="moin-upperalpha-list"][li="Item"]'),
             ('<html><div><ol type="I"><li>Item</li></ol></div></html>',
-              '/div/div/ol[@class="moin-upperroman-list"][li="Item"]'),
+                '/div/div/ol[@class="moin-upperroman-list"][li="Item"]'),
             ('<html><div><ol type="a"><li>Item</li></ol></div></html>',
-              '/div/div/ol[@class="moin-loweralpha-list"][li="Item"]'),
+                '/div/div/ol[@class="moin-loweralpha-list"][li="Item"]'),
             ('<html><div><ol type="i"><li>Item<li></ol></div></html>',
-              '/div/div/ol[@class="moin-lowerroman-list"][li="Item"]'),
+                '/div/div/ol[@class="moin-lowerroman-list"][li="Item"]'),
             ('<html><div><dl><dt>Label</dt><dd>Item</dd></dl></div></html>',
-             '/div/div/dl[dt="Label"][dd="Item"]'),
+                '/div/div/dl[dt="Label"][dd="Item"]'),
             ('<html><div><dir><li>Item</li></dir></div></html>',
-              '/div/div/ul[li="Item"]'),
+                '/div/div/ul[li="Item"]'),
             ('<div><ul><li>Item 1</li><p>Pouet</p><li>Item 2</li><li>Item 3</li></ul></div>',
-             '/div/ul[li[1]="Item 1"][li[2]="Item 2"][li[3]="Item 3"]'),
-             #Test for bug with line return and spaces
+                '/div/ul[li[1]="Item 1"][li[2]="Item 2"][li[3]="Item 3"]'),
+            #Test for bug with line return and spaces
             ('<div><ul><li>\n Item 1</li>\n<li>\n Item 2</li>\n<li>\n Item 3</li>\n</ul></div>',
-             '/div/ul[li[1]="\n Item 1"][li[2]="\n Item 2"][li[3]="\n Item 3"]'),
+                '/div/ul[li[1]="\n Item 1"][li[2]="\n Item 2"][li[3]="\n Item 3"]'),
             ('<div><ol><li>\n Item 1</li>\n<li>\n Item 2</li>\n<li>\n Item 3</li>\n</ol></div>',
-             '/div/ol[li[1]="\n Item 1"][li[2]="\n Item 2"][li[3]="\n Item 3"]'),
+                '/div/ol[li[1]="\n Item 1"][li[2]="\n Item 2"][li[3]="\n Item 3"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -194,7 +194,7 @@
             #('<html><div><img src="uri:test" /></div></html>',
             #  '/page/body/div/object/@xlink:href="uri:test"'),
             ('<html><div><object data="href"></object></div></html>',
-              '/div/div/div/object[@data="href"]'),
+                '/div/div/div/object[@data="href"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -202,14 +202,14 @@
     def test_table(self):
         data = [
             ('<html><div><table><thead><tr><td>Header</td></tr></thead><tfoot><tr><td>Footer</td></tr></tfoot><tbody><tr><td>Cell</td></tr></tbody></table></div></html>',
-             '/div/div/table[./thead/tr[td="Header"]][./tfoot/tr[td="Footer"]][./tbody/tr[td="Cell"]]'),
+                '/div/div/table[./thead/tr[td="Header"]][./tfoot/tr[td="Footer"]][./tbody/tr[td="Cell"]]'),
             ('<html><div><table><tbody><tr><td colspan="2">Cell</td></tr></tbody></table></div></html>',
-             '/div/div/table/tbody/tr/td[text()="Cell"][@colspan="2"]'),
+                '/div/div/table/tbody/tr/td[text()="Cell"][@colspan="2"]'),
             ('<html><div><table><tbody><tr><td rowspan="2">Cell</td></tr></tbody></table></div></html>',
-             '/div/div/table/tbody/tr/td[text()="Cell"][@rowspan="2"]'),
+                '/div/div/table/tbody/tr/td[text()="Cell"][@rowspan="2"]'),
             # Test for bug with newline between cell
             ('<div><table>\n<tbody>\n<tr>\n<td>\n Cell 1:1</td>\n<td>\n Cell 1:2</td>\n</tr>\n<tr>\n<td>\n Cell 2:1</td>\n<td>\n Cell 2:2</td>\n</tr>\n</tbody>\n</table></div>',
-              '/div/table/tbody[tr[1][td[1]="\n Cell 1:1"][td[2]="\n Cell 1:2"]][tr[2][td[1]="\n Cell 2:1"][td[2]="\n Cell 2:2"]]'),
+                '/div/table/tbody[tr[1][td[1]="\n Cell 1:1"][td[2]="\n Cell 1:2"]][tr[2][td[1]="\n Cell 2:1"][td[2]="\n Cell 2:2"]]'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_html_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_html_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -107,10 +107,10 @@
         data = [
             # Basic Links
             ('<page:page><page:body><page:a xlink:href="uri:test">Test</page:a></page:body></page:page>',
-              '/div/a[text()="Test"][@href="uri:test"]'),
+                '/div/a[text()="Test"][@href="uri:test"]'),
             # Links with xml:base
             ('<page xml:base="http://base.tld/"><body><p><a xlink:href="page.html">Test</a></p></body></page>',
-              '/div/p/a[@href="http://base.tld/page.html"][text()="Test"]'),
+                '/div/p/a[@href="http://base.tld/page.html"][text()="Test"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -182,7 +182,7 @@
             ('<page><body><object xlink:href="href.png" page:type="image/png"/></body></page>',
                 '/div/img[@src="href.png"]'),
             ('<page xml:base="http://base.tld/"><body><object xlink:href="href.png" page:type="image/png"/></body></page>',
-              '/div/img[@src="http://base.tld/href.png"]'),
+                '/div/img[@src="http://base.tld/href.png"]'),
         ]
         for i in data:
             yield (self.do, ) + i
@@ -204,9 +204,9 @@
     def test_style(self):
         data = [
             ('<page><body><p style="font-size: 1em">Text</p></body></page>',
-              '/div/p[@style="font-size: 1em"][text()="Text"]'),
+                '/div/p[@style="font-size: 1em"][text()="Text"]'),
             ('<page><body><p style="color: black; font-size: 1em">Text</p></body></page>',
-              '/div/p[@style="color: black; font-size: 1em"][text()="Text"]'),
+                '/div/p[@style="color: black; font-size: 1em"][text()="Text"]'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_moinwiki_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_moinwiki_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -257,20 +257,20 @@
                 '<page><body><p /></body></page>'),
             # XXX: Is <page> correct?
             (u'{{{#!\nwiki\n}}}',
-               '<page><body><page><body><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body><p>wiki</p></body></page></body></page>'),
             (u'{{{#!(style="background-color: red")\nwiki\n}}}',
-               '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
             (u'{{{#!wiki\nwiki\n}}}',
-               '<page><body><page><body><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body><p>wiki</p></body></page></body></page>'),
             (u'{{{#!wiki(style="background-color: red")\nwiki\n}}}',
-               '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body style="background-color: red"><p>wiki</p></body></page></body></page>'),
             # TODO: Backward compatibility
             (u'{{{#!wiki red/solid\nwiki\n}}}',
-               '<page><body><page><body class="red solid"><p>wiki</p></body></page></body></page>'),
+                '<page><body><page><body class="red solid"><p>wiki</p></body></page></body></page>'),
             (u'{{{#!text/plain\ntext\n}}}',
-               u'<page><body><part content-type="text/plain"><body>text</body></part></body></page>'),
+                u'<page><body><part content-type="text/plain"><body>text</body></part></body></page>'),
             (u'{{{#!text/x.moin.creole\ntext\n}}}',
-               u'<page><body><part content-type="text/x.moin.creole"><body>text</body></part></body></page>'),
+                u'<page><body><part content-type="text/x.moin.creole"><body>text</body></part></body></page>'),
         ]
         for i in data:
             yield (self.do, ) + i
--- a/MoinMoin/converter/_tests/test_registry.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_registry.py	Mon Feb 18 00:46:53 2013 +0100
@@ -43,7 +43,7 @@
                 (type_moin_document, Type('application/x-xhtml-moin-page'), HtmlOutConverterPage),
                 (type_moin_document, type_moin_wiki, MoinwikiOutConverter),
                 (type_moin_document, Type('x-moin/format;name=wiki'), MoinwikiOutConverter),
-            ]:
+        ]:
             conv = default_registry.get(type_input, type_output)
             assert isinstance(conv, ExpectedClass)
 
@@ -53,7 +53,7 @@
                 (dict(includes='expandall'), IncludeConverter),
                 (dict(links='extern'), LinkConverterExternOutput),
                 (dict(items='refs'), LinkConverterItemRefs),
-            ]:
+        ]:
             conv = default_registry.get(type_moin_document, type_moin_document, **kwargs)
             assert isinstance(conv, ExpectedClass)
 
--- a/MoinMoin/converter/_tests/test_rst_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_rst_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -49,7 +49,7 @@
             (u'1. a\n2. b\n\nA. c\n\na. A\n\n   3. B\n\n   4. C\n\n', '<page><body><list item-label-generate="ordered"><list-item><list-item-body><p>a</p></list-item-body></list-item><list-item><list-item-body><p>b</p></list-item-body></list-item></list><list item-label-generate="ordered" list-style-type="upper-alpha"><list-item><list-item-body><p>c</p></list-item-body></list-item></list><list item-label-generate="ordered" list-style-type="lower-alpha"><list-item><list-item-body><p>A</p><list item-label-generate="ordered"><list-item><list-item-body><p>B</p></list-item-body></list-item><list-item><list-item-body><p>C</p></list-item-body></list-item></list></list-item-body></list-item></list></body></page>'),
             (u'* A\n\n   - B\n\n      + C\n\n   - D\n\n* E', '<page><body><list item-label-generate="unordered"><list-item><list-item-body><p>A</p><list><list-item><list-item-body><list item-label-generate="unordered"><list-item><list-item-body><p>B</p><list><list-item><list-item-body><list item-label-generate="unordered"><list-item><list-item-body><p>C</p></list-item-body></list-item></list></list-item-body></list-item></list></list-item-body></list-item><list-item><list-item-body><p>D</p></list-item-body></list-item></list></list-item-body></list-item></list></list-item-body></list-item><list-item><list-item-body><p>E</p></list-item-body></list-item></list></body></page>'),
             (u'what\n      def\n\nhow\n      to', '<page><body><list><list-item><list-item-label>what</list-item-label><list-item-body><p>def</p></list-item-body></list-item><list-item><list-item-label>how</list-item-label><list-item-body><p>to</p></list-item-body></list-item></list></body></page>')
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
@@ -62,7 +62,7 @@
    :scale: 50
    :alt: alternate text""", '<page><body><object alt="images/biohazard.png" height="100" scale="50" width="200" xlink:href="images/biohazard.png" /></body></page>'),
             (u'abc |a| cba\n\n.. |a| image:: test.png', '<page><body><p>abc <object alt="test.png" xlink:href="test.png" /> cba</p></body></page>'),
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
@@ -70,7 +70,7 @@
         data = [
             (u'Chapter 1 Title\n===============\n\nSection 1.1 Title\n-----------------\n\nSubsection 1.1.1 Title\n~~~~~~~~~~~~~~~~~~~~~~\n\nSection 1.2 Title\n-----------------\n\nChapter 2 Title\n===============\n', '<page><body><h outline-level="2">Chapter 1 Title</h><h outline-level="3">Section 1.1 Title</h><h outline-level="4">Subsection 1.1.1 Title</h><h outline-level="3">Section 1.2 Title</h><h outline-level="2">Chapter 2 Title</h></body></page>'),
             (u'================\n Document Title\n================\n\n----------\n Subtitle\n----------\n\nSection Title\n=============', '<page><body><h outline-level="1">Document Title</h><h outline-level="2">Subtitle</h><h outline-level="2">Section Title</h></body></page>')
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
@@ -78,7 +78,7 @@
         data = [
             (u'Abra [1]_\n\n.. [1] arba', '<page><body><p>Abra <note note-class="footnote"><note-body>arba</note-body></note></p></body></page>'),
             (u'Abra [#]_\n\n.. [#] arba', '<page><body><p>Abra <note note-class="footnote"><note-body>arba</note-body></note></p></body></page>'),
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
@@ -86,7 +86,7 @@
         data = [
             (u'Abra test_ arba\n\n.. _test: http://python.org', '<page><body><p>Abra <a xlink:href="http://python.org">test</a> arba</p></body></page>'),
             (u'Abra test__ arba\n\n.. __: http://python.org', '<page><body><p>Abra <a xlink:href="http://python.org">test</a> arba</p></body></page>')
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
@@ -99,7 +99,7 @@
             (u'.. contents::\n  :depth: 1\n', '<page><body><table-of-content outline-level="1" /></body></page>'),
             (u'.. parser:: python test=test\n  import test\n  test.s = 11', '<page><body><part content-type="x-moin/format;name=python"><arguments><argument name="test">test</argument></arguments>import test\ntest.s = 11</part></body></page>'),
             (u'.. include:: RecentChanges', '<page><body><part content-type="x-moin/macro;name=Include"><arguments><argument>RecentChanges</argument></arguments>&lt;&lt;Include(RecentChanges)&gt;&gt;</part></body></page>'),
-            ]
+        ]
         for i in data:
             yield (self.do, ) + i
 
--- a/MoinMoin/converter/_tests/test_rst_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_rst_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -67,7 +67,7 @@
         data = [
             (u"<page:table><page:table-body><page:table-row><page:table-cell>A</page:table-cell><page:table-cell>B</page:table-cell><page:table-cell page:number-rows-spanned=\"2\">D</page:table-cell></page:table-row><page:table-row><page:table-cell page:number-cols-spanned=\"2\">C</page:table-cell></page:table-row></page:table-body></page:table>", "+-+-+-+\n|A|B|D|\n+-+-+ +\n|C  | |\n+---+-+\n\n"),
             (u"<page:table><page:table-body><page:table-row><page:table-cell><page:strong>A</page:strong></page:table-cell><page:table-cell><page:strong>B</page:strong></page:table-cell><page:table-cell><page:strong>C</page:strong></page:table-cell></page:table-row><page:table-row><page:table-cell><page:p>1</page:p></page:table-cell><page:table-cell>2</page:table-cell><page:table-cell>3</page:table-cell></page:table-row></page:table-body></page:table>", u"+-----+-----+-----+\n|**A**|**B**|**C**|\n+-----+-----+-----+\n|1    |2    |3    |\n+-----+-----+-----+\n\n"),
-             (u'<page:page><page:body><page:table><page:table-header><page:table-row><page:table-cell><page:p>AAAAAAAAAAAAAAAAAA</page:p></page:table-cell><page:table-cell><page:p>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</page:p></page:table-cell></page:table-row></page:table-header><page:table-body><page:table-row><page:table-cell page:number-rows-spanned=\"2\"><page:p>cell spanning 2 rows</page:p></page:table-cell><page:table-cell><page:p>cell in the 2nd column</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell><page:p>cell in the 2nd column of the 2nd row</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell page:number-cols-spanned=\"2\"><page:p>test</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell page:number-cols-spanned=\"2\"><page:p>test</page:p></page:table-cell></page:table-row></page:table-body></page:table></page:body></page:page>', """+--------------------+-------------------------------------+
+            (u'<page:page><page:body><page:table><page:table-header><page:table-row><page:table-cell><page:p>AAAAAAAAAAAAAAAAAA</page:p></page:table-cell><page:table-cell><page:p>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</page:p></page:table-cell></page:table-row></page:table-header><page:table-body><page:table-row><page:table-cell page:number-rows-spanned=\"2\"><page:p>cell spanning 2 rows</page:p></page:table-cell><page:table-cell><page:p>cell in the 2nd column</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell><page:p>cell in the 2nd column of the 2nd row</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell page:number-cols-spanned=\"2\"><page:p>test</page:p></page:table-cell></page:table-row><page:table-row><page:table-cell page:number-cols-spanned=\"2\"><page:p>test</page:p></page:table-cell></page:table-row></page:table-body></page:table></page:body></page:page>', """+--------------------+-------------------------------------+
 |AAAAAAAAAAAAAAAAAA  |BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB  |
 +====================+=====================================+
 |cell spanning 2 rows|cell in the 2nd column               |
--- a/MoinMoin/converter/_tests/test_smiley.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/_tests/test_smiley.py	Mon Feb 18 00:46:53 2013 +0100
@@ -34,8 +34,8 @@
     '2 at once': (
         '<page><body><p>:-) :-(</p></body></page>',
         '/page/body/p'
-            '[span[1][@class="moin-text-icon moin-smile"]]'
-            '[span[2][@class="moin-text-icon moin-sad"]]'),
+        '[span[1][@class="moin-text-icon moin-smile"]]'
+        '[span[2][@class="moin-text-icon moin-sad"]]'),
     'strong': (
         '<page><body><p><strong>:-)</strong></p></body></page>',
         '/page/body/p/strong/span[@class="moin-text-icon moin-smile"]'),
--- a/MoinMoin/converter/archive_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/archive_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -58,7 +58,7 @@
             contents = [(self.process_size(size),
                          self.process_datetime(dt),
                          self.process_name(name),
-                        ) for size, dt, name in contents]
+            ) for size, dt, name in contents]
             table = self.build_dom_table(contents, head=[_("Size"), _("Timestamp"), _("Name")], cls='zebra')
             body = moin_page.body(children=(table, ))
             return moin_page.page(children=(body, ))
--- a/MoinMoin/converter/creole_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/creole_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -126,8 +126,7 @@
         $
     """
 
-    def block_macro_repl(self, _iter_content, stack, macro, macro_name,
-            macro_args=None, macro_text=None):
+    def block_macro_repl(self, _iter_content, stack, macro, macro_name, macro_args=None, macro_text=None):
         """Handles macros using the placeholder syntax."""
         stack.clear()
 
@@ -363,8 +362,7 @@
         )
     """
 
-    def inline_macro_repl(self, stack, macro, macro_name,
-            macro_args=None, macro_text=None):
+    def inline_macro_repl(self, stack, macro, macro_name, macro_args=None, macro_text=None):
         """Handles macros using the placeholder syntax."""
 
         if macro_args:
--- a/MoinMoin/converter/docbook_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/docbook_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -136,7 +136,7 @@
                       'simplesect', 'subtitle', 'synopsis',
                       'synopfragment', 'task', 'taskprerequisites',
                       'taskrelated', 'tasksummary', 'title',
-                     ])
+    ])
 
     # DocBook has admonition as individual element, but the DOM Tree
     # has only one element for it, so we will convert all the DocBook
@@ -145,18 +145,23 @@
 
     # DocBook can handle three kind of media: audio, image, video. Here
     # is an helper dictionary to process such of element.
-    media_tags = {'audioobject': (['wav', 'mp3', 'ogg'],
-                                 'audiodata',
-                                 'audio/',
-                                 ),
-                  'imageobject': (['gif', 'png', 'jpg', 'png'],
-                                 'imagedata',
-                                 'image/',
-                                 ),
-                  'videoobject': (['ogg', 'avi', 'mp4'],
-                                 'videodata',
-                                 'video/',
-                                 )}
+    media_tags = {
+        'audioobject': (
+            ['wav', 'mp3', 'ogg'],
+            'audiodata',
+            'audio/',
+        ),
+        'imageobject': (
+            ['gif', 'png', 'jpg', 'png'],
+            'imagedata',
+            'image/',
+        ),
+        'videoobject': (
+            ['ogg', 'avi', 'mp4'],
+            'videodata',
+            'video/',
+        )
+    }
 
     # DocBook tags which can be convert directly to a DOM Tree element
     simple_tags = {'code': moin_page.code,
@@ -288,8 +293,7 @@
         """
         result = {}
         for key, value in element.attrib.iteritems():
-            if key.uri == xml \
-              and key.name in ['id', 'base', 'lang']:
+            if key.uri == xml and key.name in ['id', 'base', 'lang']:
                 result[key] = value
         if result:
             # We clear standard_attribute, if ancestror attribute
@@ -395,11 +399,9 @@
                     caption = self.do_children(child, depth + 1)[0]
                 if child.tag.name == 'textobject':
                     text_object = child
-        return self.visit_data_element(object_element, depth, object_data,
-            text_object, caption)
+        return self.visit_data_element(object_element, depth, object_data, text_object, caption)
 
-    def visit_data_element(self, element, depth, object_data,
-                           text_object, caption):
+    def visit_data_element(self, element, depth, object_data, text_object, caption):
         """
         We will try to return an object element based on the
         object_data. If it is not possible, we return a paragraph
@@ -782,11 +784,11 @@
             if isinstance(child, ET.Element):
                 if child.tag.name == 'seg':
                     label_tag = ET.Element(moin_page('list-item-label'),
-                            attrib={}, children=labels[counter % len(labels)])
+                                           attrib={}, children=labels[counter % len(labels)])
                     body_tag = ET.Element(moin_page('list-item-body'),
-                            attrib={}, children=self.visit(child, depth))
+                                          attrib={}, children=self.visit(child, depth))
                     item_tag = ET.Element(moin_page('list-item'),
-                            attrib={}, children=[label_tag, body_tag])
+                                          attrib={}, children=[label_tag, body_tag])
                     item_tag = (item_tag, )
                     new.extend(item_tag)
                     counter += 1
@@ -825,8 +827,7 @@
                     labels.extend(r)
                 else:
                     if child.tag.name == 'seglistitem':
-                        r = self.visit_docbook_seglistitem(child,
-                            labels, depth)
+                        r = self.visit_docbook_seglistitem(child, labels, depth)
                     else:
                         r = self.visit(child)
                     if r is None:
@@ -925,8 +926,7 @@
         attrib = {}
         children = []
         if class_attribute:
-            attrib[html('class')] = ''.join(['db-tag-',
-                                        class_attribute])
+            attrib[html('class')] = ''.join(['db-tag-', class_attribute])
         else:
             attrib[html('class')] = 'db-tag'
         if namespace_attribute:
@@ -944,7 +944,7 @@
         trademark_entities = {'copyright': '&copy;',
                               'registred': '&reg;',
                               'trade': '&trade;',
-                             }
+        }
         trademark_class = element.get('class')
         children = self.do_children(element, depth)
         if trademark_class in trademark_entities:
@@ -1146,8 +1146,7 @@
         children.append(self.visit(element, depth))
         # We show the table of content only if it is not empty
         if self.is_section:
-            children.insert(0, self.new(moin_page('table-of-content'),
-                                    attrib={}, children={}))
+            children.insert(0, self.new(moin_page('table-of-content'), attrib={}, children={}))
         body = self.new(moin_page.body, attrib={}, children=children)
         return self.new(moin_page.page, attrib=attrib, children=[body])
 
--- a/MoinMoin/converter/docbook_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/docbook_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -261,7 +261,7 @@
             if self.parent_section != 0:
                 section_tag = 'sect{0}'.format(self.parent_section)
                 section = ET.Element(docbook(section_tag), attrib={},
-                          children=self.section_children[self.current_section])
+                                     children=self.section_children[self.current_section])
                 self.section_children[self.parent_section].append(section)
                 self.current_section = int(depth)
 
@@ -515,5 +515,4 @@
 
 from . import default_registry
 from MoinMoin.util.mime import Type, type_moin_document
-default_registry.register(Converter._factory, type_moin_document,
-    Type('application/docbook+xml'))
+default_registry.register(Converter._factory, type_moin_document, Type('application/docbook+xml'))
--- a/MoinMoin/converter/html_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/html_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -33,7 +33,7 @@
     # Namespace of our input data
     html_namespace = {
         html.namespace: 'xhtml',
-        }
+    }
 
     # HTML tags which can be converted directly to the moin_page namespace
     symmetric_tags = set(['div', 'p', 'strong', 'code', 'quote', 'blockquote'])
@@ -43,16 +43,16 @@
 
     # HTML tags which can be convert without attributes in a different DOM tag
     simple_tags = {  # Emphasis
-                   'em': moin_page.emphasis, 'i': moin_page.emphasis,
-                   # Strong
-                   'b': moin_page.strong, 'strong': moin_page.strong,
-                   # Code and Blockcode
-                   'pre': moin_page.blockcode, 'tt': moin_page.code,
-                   'samp': moin_page.code,
-                   # Lists
-                   'dt': moin_page.list_item_label, 'dd': moin_page.list_item_body,
-                   # TODO : Some tags related to tables can be also simplify
-                  }
+        'em': moin_page.emphasis, 'i': moin_page.emphasis,
+        # Strong
+        'b': moin_page.strong, 'strong': moin_page.strong,
+        # Code and Blockcode
+        'pre': moin_page.blockcode, 'tt': moin_page.code,
+        'samp': moin_page.code,
+        # Lists
+        'dt': moin_page.list_item_label, 'dd': moin_page.list_item_body,
+        # TODO : Some tags related to tables can be also simplify
+    }
 
     # HTML Tag which does not have equivalence in the DOM Tree
     # But we keep the information using <span element>
@@ -65,7 +65,7 @@
                         'label', 'legend', 'link', 'map', 'menu', 'noframes', 'noscript',
                         'optgroup', 'option', 'param', 'script', 'select', 'style',
                         'textarea', 'title', 'var',
-                       ])
+    ])
 
     # standard_attributes are html attributes which are used
     # directly in the DOM tree, without any conversion
--- a/MoinMoin/converter/html_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/html_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -197,8 +197,7 @@
         # Unknown element are just copied
         return self.new_copy(elem.tag, elem)
 
-    def visit_moinpage_a(self, elem,
-            _tag_html_a=html.a, _tag_html_href=html.href, _tag_xlink_href=xlink.href):
+    def visit_moinpage_a(self, elem, _tag_html_a=html.a, _tag_html_href=html.href, _tag_xlink_href=xlink.href):
         attrib = {}
         href = elem.get(_tag_xlink_href)
         if href:
@@ -617,12 +616,10 @@
                 headings = list(headings)
                 maxlevel = max(h[1] for h in headings)
                 headtogglelink = html.a(attrib={
-                                         html.class_: 'moin-showhide',
-                                         html.href_: '#',
-                                         html.onclick_:
-                                            "$('.moin-table-of-contents ol').toggle();return false;",
-                                     },
-                                     children=['[+]', ])
+                    html.class_: 'moin-showhide',
+                    html.href_: '#',
+                    html.onclick_: "$('.moin-table-of-contents ol').toggle();return false;",
+                }, children=['[+]', ])
                 elem_h = html.div(attrib={html.class_: 'moin-table-of-contents-heading'},
                                   children=[_('Contents'), headtogglelink])
                 elem.append(elem_h)
@@ -655,20 +652,16 @@
                         stack.pop()
                         stack_push(html.li({html.id_: 'li{0}'.format(id)}))
                     togglelink = html.a(attrib={
-                                         html.href_: "#",
-                                         html.onclick_:
-                                            "$('#li{0} ol').toggle();return false;".format(id),
-                                         html.class_: 'moin-showhide',
-                                     },
-                                     children=["[+]", ])
-                    elem_a = html.a(attrib={html.href: '#' + id},
-                                    children=[text, ])
+                        html.href_: "#",
+                        html.onclick_: "$('#li{0} ol').toggle();return false;".format(id),
+                        html.class_: 'moin-showhide',
+                    }, children=["[+]", ])
+                    elem_a = html.a(attrib={html.href: '#' + id}, children=[text, ])
                     stack_top_append(elem_a)
                     old_toggle = togglelink
         return ret
 
-    def visit(self, elem,
-            _tag_moin_page_page_href=moin_page.page_href):
+    def visit(self, elem, _tag_moin_page_page_href=moin_page.page_href):
         # TODO: Is this correct, or is <page> better?
         if elem.get(_tag_moin_page_page_href):
             self._special_stack.append(SpecialPage())
@@ -683,8 +676,7 @@
         else:
             return super(ConverterPage, self).visit(elem)
 
-    def visit_moinpage_h(self, elem,
-            _tag_html_id=html.id):
+    def visit_moinpage_h(self, elem, _tag_html_id=html.id):
         elem = super(ConverterPage, self).visit_moinpage_h(elem)
 
         id = elem.get(_tag_html_id)
--- a/MoinMoin/converter/include.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/include.py	Mon Feb 18 00:46:53 2013 +0100
@@ -107,16 +107,16 @@
 
 # elements generated by moin wiki markup that cannot have block children
 NO_BLOCK_CHILDREN = [
-        'p',
-        'span',  # /*comment*/, ~+big+~, ~-small-~ via classes comment, moin-big, moin-small
-        'emphasis',  # ''italic''
-        'strong',  # '''bold'''
-        'del',  # --(stroke)--
-        'ins',  # __underline__
-        # 'sub',  # ,,subscript,, # no markup allowed within subscripts
-        # 'sup',  # ^superscript^ # no markup allowed within superscripts
-        'a',  # [[SomeItem|{{logo.png}}]]
-        ]
+    'p',
+    'span',  # /*comment*/, ~+big+~, ~-small-~ via classes comment, moin-big, moin-small
+    'emphasis',  # ''italic''
+    'strong',  # '''bold'''
+    'del',  # --(stroke)--
+    'ins',  # __underline__
+    # 'sub',  # ,,subscript,, # no markup allowed within subscripts
+    # 'sup',  # ^superscript^ # no markup allowed within superscripts
+    'a',  # [[SomeItem|{{logo.png}}]]
+]
 
 
 class XPointer(list):
--- a/MoinMoin/converter/link.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/link.py	Mon Feb 18 00:46:53 2013 +0100
@@ -47,9 +47,8 @@
         # because it is also called in subclasses
         return self.traverse_tree(*args, **kw)
 
-    def traverse_tree(self, elem, page=None,
-            __tag_page_href=moin_page.page_href, __tag_link=_tag_xlink_href,
-            __tag_include=_tag_xinclude_href):
+    def traverse_tree(self, elem, page=None, __tag_page_href=moin_page.page_href,
+                      __tag_link=_tag_xlink_href, __tag_include=_tag_xinclude_href):
         """
         Traverses the tree and handles each element appropriately
         """
--- a/MoinMoin/converter/macro.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/macro.py	Mon Feb 18 00:46:53 2013 +0100
@@ -87,9 +87,7 @@
             # some standard text.
             logging.exception("Macro {0} raised an exception:".format(name))
             elem_error.append(_('<<%(macro_name)s: execution failed [%(error_msg)s] (see also the log)>>',
-                    macro_name=name,
-                    error_msg=unicode(e),
-                ))
+                              macro_name=name, error_msg=unicode(e), ))
 
         if len(elem_body):
             elem.append(elem_body)
--- a/MoinMoin/converter/markdown_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/markdown_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -75,16 +75,16 @@
 
     # HTML tags which can be convert without attributes in a different DOM tag
     simple_tags = {  # Emphasis
-                   'em': moin_page.emphasis, 'i': moin_page.emphasis,
-                   # Strong
-                   'b': moin_page.strong, 'strong': moin_page.strong,
-                   # Code and Blockcode
-                   'pre': moin_page.blockcode, 'tt': moin_page.code,
-                   'samp': moin_page.code,
-                   # Lists
-                   'dt': moin_page.list_item_label, 'dd': moin_page.list_item_body,
-                   # TODO : Some tags related to tables can be also simplify
-                  }
+        'em': moin_page.emphasis, 'i': moin_page.emphasis,
+        # Strong
+        'b': moin_page.strong, 'strong': moin_page.strong,
+        # Code and Blockcode
+        'pre': moin_page.blockcode, 'tt': moin_page.code,
+        'samp': moin_page.code,
+        # Lists
+        'dt': moin_page.list_item_label, 'dd': moin_page.list_item_body,
+        # TODO : Some tags related to tables can be also simplify
+    }
 
     # HTML Tag which does not have equivalence in the DOM Tree
     # But we keep the information using <span element>
@@ -97,7 +97,7 @@
                         'label', 'legend', 'link', 'map', 'menu', 'noframes', 'noscript',
                         'optgroup', 'option', 'param', 'script', 'select', 'style',
                         'textarea', 'title', 'var',
-                       ])
+    ])
 
     # standard_attributes are html attributes which are used
     # directly in the DOM tree, without any conversion
@@ -292,8 +292,7 @@
         elif element.tag == "ol":
             attrib[moin_page('item-label-generate')] = 'ordered'
 
-        return ET.Element(moin_page.list, attrib=attrib,
-                children=self.do_children(element))
+        return ET.Element(moin_page.list, attrib=attrib, children=self.do_children(element))
 
     def visit_a(self, element):
         key = xlink('href')
--- a/MoinMoin/converter/mediawiki_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/mediawiki_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -285,11 +285,10 @@
             yield match.group('text')
 
     def indent_repl(self, iter_content, stack, line,
-            indent, text, list_begin=None, list_definition=None,
-            list_definition_text=None, list_numbers=None,
-            list_bullet=None,
-            list_none=None):
-
+                    indent, text, list_begin=None, list_definition=None,
+                    list_definition_text=None, list_numbers=None,
+                    list_bullet=None,
+                    list_none=None):
         level = len(indent)
         list_type = 'unordered', 'none'
         if list_begin:
@@ -629,7 +628,7 @@
         return ret
 
     def inline_link_repl(self, stack, link, link_url=None, link_item=None,
-                            link_args=u'', external_link_url=None, alt_text=u''):
+                         link_args=u'', external_link_url=None, alt_text=u''):
         """Handle all kinds of links."""
         link_text = ''
         link_args_list = []
@@ -723,8 +722,8 @@
     """
 
     def inline_nowiki_repl(self, stack, nowiki, nowiki_text=None,
-            nowiki_text_pre=None, pre_args='',
-            nowiki_text_code=None, nowiki_text_tt=None):
+                           nowiki_text_pre=None, pre_args='',
+                           nowiki_text_code=None, nowiki_text_tt=None):
         text = None
 
         if nowiki_text is not None:
@@ -767,8 +766,8 @@
         block_comment,
         block_head,
         block_separator,
-       # block_macro,
-       # block_nowiki,
+        # block_macro,
+        # block_nowiki,
         block_text,
     )
     block_re = re.compile('|'.join(block), re.X | re.U | re.M)
@@ -779,13 +778,13 @@
         inline_link,
         inline_breakline,
         inline_blockquote,
-        #inline_macro,
+        # inline_macro,
         inline_nowiki,
-        #inline_object,
+        # inline_object,
         inline_emphstrong,
         inline_comment,
         inline_footnote,
-        #inline_size,
+        # inline_size,
         inline_strike,
         inline_subscript,
         inline_superscript,
@@ -833,18 +832,18 @@
             's',
             'sub',
             'sup',
-            ]
+        ]
 
         nowiki_tags = [
             'pre',
             'code',
             'tt',
             'nowiki',
-            ]
+        ]
 
         block_tags = [
             'blockquote',
-            ]
+        ]
 
         def __init__(self):
             self.opened_tags = []
--- a/MoinMoin/converter/moinwiki19_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/moinwiki19_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -83,8 +83,8 @@
     }
 
     def inline_freelink_repl(self, stack, freelink, freelink_bang=None,
-            freelink_interwiki_page=None, freelink_interwiki_ref=None,
-            freelink_page=None, freelink_email=None):
+                             freelink_interwiki_page=None, freelink_interwiki_ref=None,
+                             freelink_page=None, freelink_email=None):
         if freelink_bang:
             stack.top_append(freelink)
             return
@@ -110,8 +110,8 @@
                 return
 
             link = Iri(scheme='wiki',
-                    authority=freelink_interwiki_ref,
-                    path='/' + freelink_interwiki_page)
+                       authority=freelink_interwiki_ref,
+                       path='/' + freelink_interwiki_page)
             text = freelink_interwiki_page
 
         attrib[xlink.href] = link
--- a/MoinMoin/converter/moinwiki_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/moinwiki_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -261,8 +261,8 @@
             yield line
 
     def block_nowiki_repl(self, iter_content, stack, nowiki, nowiki_marker,
-            nowiki_interpret=None, nowiki_name=None, nowiki_args=None,
-            nowiki_args_old=None):
+                          nowiki_interpret=None, nowiki_name=None, nowiki_args=None,
+                          nowiki_args_old=None):
         stack.clear()
 
         nowiki_marker_len = len(nowiki_marker)
@@ -406,11 +406,11 @@
             yield match.group('text')
 
     def indent_repl(self, iter_content, stack, line,
-            indent, text, list_begin=None, list_definition=None,
-            list_definition_text=None, list_numbers=None,
-            list_alpha=None, list_roman=None, list_bullet=None,
-            list_start_number=None, list_start_roman=None, list_start_alpha=None,
-            list_none=None):
+                    indent, text, list_begin=None, list_definition=None,
+                    list_definition_text=None, list_numbers=None,
+                    list_alpha=None, list_roman=None, list_bullet=None,
+                    list_start_number=None, list_start_roman=None, list_start_alpha=None,
+                    list_none=None):
 
         level = len(indent)
 
@@ -698,14 +698,14 @@
     """ % dict(uri_schemes='|'.join(URI_SCHEMES))
 
     def inline_link_repl(self, stack, link, link_url=None, link_item=None,
-            link_text=None, link_args=None,
-            link_interwiki_site=None, link_interwiki_item=None):
+                         link_text=None, link_args=None,
+                         link_interwiki_site=None, link_interwiki_item=None):
         """Handle all kinds of links."""
         if link_interwiki_site:
             if is_known_wiki(link_interwiki_site):
                 link = Iri(scheme='wiki',
-                        authority=link_interwiki_site,
-                        path='/' + link_interwiki_item)
+                           authority=link_interwiki_site,
+                           path='/' + link_interwiki_item)
                 element = moin_page.a(attrib={xlink.href: link})
                 stack.push(element)
                 if link_text:
@@ -783,8 +783,7 @@
         )
     """
 
-    def inline_nowiki_repl(self, stack, nowiki, nowiki_text=None,
-            nowiki_text_backtick=None):
+    def inline_nowiki_repl(self, stack, nowiki, nowiki_text=None, nowiki_text_backtick=None):
         text = None
         if nowiki_text is not None:
             text = nowiki_text
--- a/MoinMoin/converter/moinwiki_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/moinwiki_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -58,7 +58,7 @@
         (u'ordered', u'upper-roman'): u'I.',
         (u'unordered', None): u'*',
         (None, None): u'::',
-        }
+    }
 
     def __init__(self):
         pass
@@ -73,29 +73,31 @@
 
     supported_tag = {
         'moinpage': (
-                'a',
-                'blockcode',
-                'break_line',
-                'code',
-                'div',
-                'emphasis',
-                'h',
-                'list',
-                'list_item',
-                'list_item_label',
-                'list_item_body',
-                'p',
-                'page',
-                'separator',
-                'span',
-                'strong',
-                'object',
-                'table',
-                'table_header',
-                'teble_footer',
-                'table_body',
-                'table_row',
-                'table_cell')}
+            'a',
+            'blockcode',
+            'break_line',
+            'code',
+            'div',
+            'emphasis',
+            'h',
+            'list',
+            'list_item',
+            'list_item_label',
+            'list_item_body',
+            'p',
+            'page',
+            'separator',
+            'span',
+            'strong',
+            'object',
+            'table',
+            'table_header',
+            'teble_footer',
+            'table_body',
+            'table_row',
+            'table_cell',
+        )
+    }
 
     @classmethod
     def factory(cls, input, output, **kw):
@@ -240,8 +242,7 @@
         return Moinwiki.linebreak
 
     def open_moinpage_list(self, elem):
-        label_type = (elem.get(moin_page.item_label_generate, None),
-                        elem.get(moin_page.list_style_type, None))
+        label_type = elem.get(moin_page.item_label_generate, None), elem.get(moin_page.list_style_type, None)
         self.list_item_labels.append(
             Moinwiki.list_type.get(label_type, u''))
         self.list_level += 1
@@ -327,16 +328,14 @@
             else:
                 ret = self.open_children(elem) + Moinwiki.p
         elif self.status[-2] == 'table':
-            if self.last_closed and self.last_closed != 'table_cell'\
-                                and self.last_closed != 'table_row':
+            if self.last_closed and self.last_closed != 'table_cell' and self.last_closed != 'table_row':
                 ret = Moinwiki.linebreak + self.open_children(elem)
             else:
                 ret = self.open_children(elem)
         elif self.status[-2] == 'list':
-            if self.last_closed and self.last_closed != 'list_item'\
-                                and self.last_closed != 'list_item_header'\
-                                and self.last_closed != 'list_item_footer'\
-                                and self.last_closed != 'list_item_label':
+            if self.last_closed and (
+                self.last_closed != 'list_item' and self.last_closed != 'list_item_header' and
+                self.last_closed != 'list_item_footer' and self.last_closed != 'list_item_label'):
                 ret = Moinwiki.linebreak + self.open_children(elem)
             else:
                 ret = self.open_children(elem)
@@ -430,11 +429,10 @@
         if text_decoration == u'underline':
             return Moinwiki.underline + self.open_children(elem) + Moinwiki.underline
         if font_size:
-            return u"{0}{1}{2}".format(Moinwiki.larger_open if font_size == u"120%"
-                                           else Moinwiki.smaller_open,
-                                       self.open_children(elem),
-                                       Moinwiki.larger_close if font_size == u"120%"
-                                           else Moinwiki.smaller_close)
+            return u"{0}{1}{2}".format(
+                Moinwiki.larger_open if font_size == u"120%" else Moinwiki.smaller_open,
+                self.open_children(elem),
+                Moinwiki.larger_close if font_size == u"120%" else Moinwiki.smaller_close)
         if baseline_shift == u'super':
             return u'^{0}^'.format(u''.join(elem.itertext()))
         if baseline_shift == u'sub':
--- a/MoinMoin/converter/rst_in.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/rst_in.py	Mon Feb 18 00:46:53 2013 +0100
@@ -149,7 +149,7 @@
 
     def visit_bullet_list(self, node):
         self.open_moin_page_node(moin_page.list(
-                        attrib={moin_page.item_label_generate: u'unordered'}))
+            attrib={moin_page.item_label_generate: u'unordered'}))
 
     def depart_bullet_list(self, node):
         self.close_moin_page_node()
@@ -245,13 +245,15 @@
         self.close_moin_page_node()
 
     def visit_enumerated_list(self, node):
-        enum_style = {'arabic': None,
-                'loweralpha': u'lower-alpha',
-                'upperalpha': u'upper-alpha',
-                'lowerroman': u'lower-roman',
-                'upperroman': u'upper-roman'}
+        enum_style = {
+            'arabic': None,
+            'loweralpha': u'lower-alpha',
+            'upperalpha': u'upper-alpha',
+            'lowerroman': u'lower-roman',
+            'upperroman': u'upper-roman',
+        }
         new_node = moin_page.list(
-                attrib={moin_page.item_label_generate: u'ordered'})
+            attrib={moin_page.item_label_generate: u'ordered'})
         type = enum_style.get(node['enumtype'], None)
         if type:
             new_node.set(moin_page.list_style_type, type)
@@ -309,7 +311,7 @@
 
     def visit_footnote_reference(self, node):
         self.open_moin_page_node(moin_page.note(
-                            attrib={moin_page.note_class: u'footnote'}))
+            attrib={moin_page.note_class: u'footnote'}))
         new_footnote = moin_page.note_body()
         self.open_moin_page_node(new_footnote)
         self.footnotes[node.children[-1]] = new_footnote
@@ -400,9 +402,9 @@
             for name, value in named_args:
                 args.append(moin_page.argument(attrib={moin_page.name: name}, children=[value]))
             arguments = moin_page.arguments(children=args)
-            self.open_moin_page_node(moin_page.part(children=[arguments],
-                                                    attrib={moin_page.content_type:
-                                                                "x-moin/format;name={0}".format(parser.split(' ')[0])}))
+            self.open_moin_page_node(moin_page.part(
+                children=[arguments],
+                attrib={moin_page.content_type: "x-moin/format;name={0}".format(parser.split(' ')[0])}))
         else:
             self.open_moin_page_node(moin_page.blockcode())
 
@@ -444,9 +446,7 @@
             arguments = refuri[2:-2].split(u'(')[1][:-1].split(u',')
             self.open_moin_page_node(
                 moin_page.part(
-                    attrib={
-                        moin_page.content_type:
-                            "x-moin/macro;name={0}".format(macro_name)}))
+                    attrib={moin_page.content_type: "x-moin/macro;name={0}".format(macro_name)}))
             if arguments:
                 self.open_moin_page_node(moin_page.arguments())
                 for i in arguments:
@@ -699,8 +699,7 @@
     # reference hack (`<<SomeMacro>>`_). This however simply adds a node to the
     # document tree which is a reference, but through a much better user
     # interface.
-    def macro(self, name, arguments, options, content, lineno,
-                content_offset, block_text, state, state_machine):
+    def macro(self, name, arguments, options, content, lineno, content_offset, block_text, state, state_machine):
         # content contains macro to be called
         if len(content):
             # Allow either with or without brackets
@@ -718,8 +717,7 @@
     macro.required_arguments = 1
     macro.optional_arguments = 0
 
-    def table_of_content(self, name, arguments, options, content, lineno,
-                            content_offset, block_text, state, state_machine):
+    def table_of_content(self, name, arguments, options, content, lineno, content_offset, block_text, state, state_machine):
         text = ''
         for i in content:
             m = re.search(r':(\w+): (\w+)', i)
@@ -736,8 +734,7 @@
     table_of_content.required_arguments = 1
     table_of_content.optional_arguments = 0
 
-    def parser(self, name, arguments, options, content, lineo,
-                content_offset, block_text, state, state_machine):
+    def parser(self, name, arguments, options, content, lineo, content_offset, block_text, state, state_machine):
         block = literal_block()
         block['parser'] = content[0]
         block.children = [nodes.Text(u"\n".join(content[1:]))]
--- a/MoinMoin/converter/rst_out.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/converter/rst_out.py	Mon Feb 18 00:46:53 2013 +0100
@@ -66,8 +66,7 @@
         self.table.append(row)
         if self.i > 0:
             if len(self.table[-2]) > self.j:
-                self.add_cell(self.table[-2][self.j][0],
-                                self.table[-2][self.j][1] - 1, Cell(''))
+                self.add_cell(self.table[-2][self.j][0], self.table[-2][self.j][1] - 1, Cell(''))
         return row
 
     def end_row(self):
@@ -97,8 +96,7 @@
         self.j += cs
         if self.i > 0:
             if len(self.table[-2]) > self.j:
-                self.add_cell(self.table[-2][self.j][0],
-                                self.table[-2][self.j][1] - 1, Cell(''))
+                self.add_cell(self.table[-2][self.j][0], self.table[-2][self.j][1] - 1, Cell(''))
         return
 
     def height(self):
@@ -233,7 +231,7 @@
         (u'ordered', u'upper-roman'): u'I.',
         (u'unordered', None): u'*',
         (None, None): u' ',
-        }
+    }
 
 
 class Converter(object):
@@ -245,29 +243,31 @@
 
     supported_tag = {
         'moinpage': (
-                'a',
-                'blockcode',
-                'break_line',
-                'code',
-                'div',
-                'emphasis',
-                'h',
-                'list',
-                'list_item',
-                'list_item_label',
-                'list_item_body',
-                'p',
-                'page',
-                'separator',
-                'span',
-                'strong',
-                'object',
-                'table',
-                'table_header',
-                'teble_footer',
-                'table_body',
-                'table_row',
-                'table_cell')}
+            'a',
+            'blockcode',
+            'break_line',
+            'code',
+            'div',
+            'emphasis',
+            'h',
+            'list',
+            'list_item',
+            'list_item_label',
+            'list_item_body',
+            'p',
+            'page',
+            'separator',
+            'span',
+            'strong',
+            'object',
+            'table',
+            'table_header',
+            'teble_footer',
+            'table_body',
+            'table_row',
+            'table_cell',
+        )
+    }
 
     @classmethod
     def factory(cls, input, output, **kw):
@@ -334,13 +334,13 @@
                         childrens_output.append(u'\n\n')
                 elif self.status[-1] == "list":
                     child =\
-                        re.sub(r"\n(.)", lambda m: u"\n{0}{1}".format(u' ' *
-                            (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), child)
+                        re.sub(r"\n(.)", lambda m: u"\n{0}{1}".format(
+                            u' ' * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), child)
                     if self.last_closed == "p":
-                        childrens_output.append(u'\n'
-                                + u' '
-                                * (len(''.join(self.list_item_labels))
-                                   + len(self.list_item_labels)))
+                        childrens_output.append(
+                            u'\n' + u' '
+                            * (len(''.join(self.list_item_labels)) +
+                               len(self.list_item_labels)))
                 elif self.status[-1] == "text":
                     if self.last_closed == "p":
                         childrens_output.append(self.define_references())
@@ -348,7 +348,7 @@
                 elif self.status[-2] == "list":
                     child =\
                         re.sub(r"\n(.)", lambda m: u"\n{0}{1}".format(u' ' *
-                            (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), child)
+                               (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), child)
                 childrens_output.append(child)
                 self.last_closed = 'text'
         self.delete_newlines = delete_newlines
@@ -396,8 +396,7 @@
         text = u''.join(elem.itertext())
         max_subpage_lvl = 3
         text = text.replace(u'\n', u'\n  '
-                                  + u' ' * (len(u''.join(self.list_item_labels))
-                                         + len(self.list_item_labels)))
+                            + u' ' * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)))
 
         if self.list_level >= 0:
             self.delete_newlines = True
@@ -410,8 +409,8 @@
                 if i:
                     self.output[-1] = self.output[-1][:i]
             """
-        return u"::\n\n  {0}{1}\n\n".format(u' ' *
-                    (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), text)
+        return u"::\n\n  {0}{1}\n\n".format(
+            u' ' * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), text)
 
     def open_moinpage_code(self, elem):
         ret = u"{0}{1}{2}".format(ReST.monospace, u''.join(elem.itertext()), ReST.monospace)
@@ -446,8 +445,7 @@
         return ReST.linebreak
 
     def open_moinpage_list(self, elem):
-        label_type = (elem.get(moin_page.item_label_generate, None),
-                        elem.get(moin_page.list_style_type, None))
+        label_type = elem.get(moin_page.item_label_generate, None), elem.get(moin_page.list_style_type, None)
         self.list_item_labels.append(
             ReST.list_type.get(label_type, u' '))
         self.list_level += 1
@@ -488,7 +486,7 @@
         if self.last_closed:
             ret = u'\n'
         ret += (u' ' * (len(u''.join(self.list_item_labels[:-1]))
-                       + len(self.list_item_labels[:-1]))
+                        + len(self.list_item_labels[:-1]))
                 + self.list_item_label)
         if self.list_item_labels[-1] in [u'1.', u'i.', u'I.', u'a.', u'A.']:
             self.list_item_labels[-1] = u'#.'
@@ -540,13 +538,13 @@
                 ret = self.open_children(elem) + ReST.p + set
         elif self.status[-1] == 'table':
             self.status.append('p')
-            if self.last_closed and self.last_closed != 'table_cell'\
-                                and self.last_closed != 'table_row'\
-                                and self.last_closed != 'table_header'\
-                                and self.last_closed != 'table_footer'\
-                                and self.last_closed != 'table_body'\
-                                and self.last_closed != 'line_break':
-          #                      and self.last_closed != 'p':
+            if self.last_closed and self.last_closed != 'table_cell' \
+                and self.last_closed != 'table_row' \
+                and self.last_closed != 'table_header' \
+                and self.last_closed != 'table_footer' \
+                and self.last_closed != 'table_body' \
+                and self.last_closed != 'line_break':
+                # and self.last_closed != 'p':
                 ret = ReST.linebreak + self.open_children(elem)
             elif self.last_closed == 'p' or self.last_closed == 'line_break':
                 ret = self.open_children(elem)
@@ -556,17 +554,17 @@
             self.status.append('p')
             if self.last_closed and self.last_closed == 'list_item_label':
                 ret = self.open_children(elem)
-            elif self.last_closed and self.last_closed != 'list_item'\
-                                and self.last_closed != 'list_item_header'\
-                                and self.last_closed != 'list_item_footer'\
-                                and self.last_closed != 'p':
+            elif self.last_closed and self.last_closed != 'list_item' \
+                and self.last_closed != 'list_item_header' \
+                and self.last_closed != 'list_item_footer' \
+                and self.last_closed != 'p':
                 ret = (ReST.linebreak + u' '
                                         * (len(u''.join(self.list_item_labels))
                                            + len(self.list_item_labels)) + self.open_children(elem))
             elif self.last_closed and self.last_closed == 'p':
                 #return ReST.p +\
                 ret = (u"\n" + u' ' * (len(u''.join(self.list_item_labels))
-                                    + len(self.list_item_labels)) + self.open_children(elem))
+                                       + len(self.list_item_labels)) + self.open_children(elem))
             else:
                 ret = self.open_children(elem)
             if not self.delete_newlines:
@@ -590,7 +588,7 @@
             if type[0] == u"x-moin/macro":
                 if len(elem) and iter(elem).next().tag.name == "arguments":
                     alt = u"<<{0}({1})>>".format(type[1].split(u'=')[1], u','.join(
-                            [u''.join(c.itertext()) for c in iter(elem).next() if c.tag.name == "argument"]))
+                        [u''.join(c.itertext()) for c in iter(elem).next() if c.tag.name == "argument"]))
                 else:
                     alt = u"<<{0}()>>".format(type[1].split(u'=')[1])
 
@@ -660,8 +658,8 @@
         table = repr(self.tablec)
         if self.status[-1] == "list":
             table =\
-                re.sub(r"\n(.)", lambda m: u"\n{0}{1}".format(u' ' *
-                        (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), u"\n" + table)
+                re.sub(r"\n(.)", lambda m: u"\n{0}{1}".format(
+                    u' ' * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels)), m.group(1)), u"\n" + table)
             return table + ReST.p
         return table + ReST.linebreak
 
@@ -689,11 +687,9 @@
 
     def open_moinpage_table_row(self, elem):
         self.table_rowclass = elem.attrib.get('class', u'')
-        self.table_rowclass = u' '.join([s for s in [self.table_rowsclass,
-                                                    self.table_rowclass] if s])
+        self.table_rowclass = u' '.join([s for s in [self.table_rowsclass, self.table_rowclass] if s])
         self.table_rowstyle = elem.attrib.get('style', u'')
-        self.table_rowstyle = u' '.join([s for s in [self.table_rowsstyle,
-                                                    self.table_rowstyle] if s])
+        self.table_rowstyle = u' '.join([s for s in [self.table_rowsstyle, self.table_rowstyle] if s])
         self.table.append([])
         self.tablec.add_row()
         ret = self.open_children(elem)
@@ -705,10 +701,8 @@
     def open_moinpage_table_cell(self, elem):
         table_cellclass = elem.attrib.get('class', u'')
         table_cellstyle = elem.attrib.get('style', u'')
-        number_cols_spanned\
-                = int(elem.get(moin_page.number_cols_spanned, 1))
-        number_rows_spanned\
-                = int(elem.get(moin_page.number_rows_spanned, 1))
+        number_cols_spanned = int(elem.get(moin_page.number_cols_spanned, 1))
+        number_rows_spanned = int(elem.get(moin_page.number_rows_spanned, 1))
 
         attrib = []
 
@@ -735,9 +729,7 @@
 
         attrib = ' '.join(attrib)
         """
-        self.table[-1].append((number_cols_spanned,
-                                number_rows_spanned,
-                                [self.open_children(elem)]))
+        self.table[-1].append((number_cols_spanned, number_rows_spanned, [self.open_children(elem)]))
         cell = self.table[-1][-1]
         self.tablec.add_cell(cell[0], cell[1], Cell(u''.join(cell[2])))
         return u''
@@ -755,12 +747,10 @@
         """
         ret = u''
         self.all_used_references.extend(self.used_references)
-        definitions = [u" " * (len(u''.join(self.list_item_labels))
-                                    + len(self.list_item_labels))
-                                  + u".. _{0}: {1}".format(t, h) for t, h in self.used_references]
-        definitions.extend(u" " * (len(u''.join(self.list_item_labels))
-                                     + len(self.list_item_labels))
-                                  + link for link in self.objects)
+        definitions = [u" " * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels))
+                       + u".. _{0}: {1}".format(t, h) for t, h in self.used_references]
+        definitions.extend(u" " * (len(u''.join(self.list_item_labels)) + len(self.list_item_labels))
+                           + link for link in self.objects)
         definition_block = u"\n\n".join(definitions)
 
         if definitions:
--- a/MoinMoin/forms.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/forms.py	Mon Feb 18 00:46:53 2013 +0100
@@ -99,11 +99,11 @@
     def u(self):
         return self.separator.join(child.u for child in self)
 
-Tags = MyJoinedString.of(String).with_properties(widget=WIDGET_TEXT).using(label=L_('Tags'), optional=True,
-                                                            separator=', ', separator_regex=re.compile(r'\s*,\s*'))
+Tags = MyJoinedString.of(String).with_properties(widget=WIDGET_TEXT).using(
+    label=L_('Tags'), optional=True, separator=', ', separator_regex=re.compile(r'\s*,\s*'))
 
-Names = MyJoinedString.of(String).with_properties(widget=WIDGET_TEXT).using(label=L_('Names'), optional=True,
-                                                            separator=', ', separator_regex=re.compile(r'\s*,\s*'))
+Names = MyJoinedString.of(String).with_properties(widget=WIDGET_TEXT).using(
+    label=L_('Names'), optional=True, separator=', ', separator_regex=re.compile(r'\s*,\s*'))
 
 Search = Text.using(default=u'', optional=True).with_properties(widget=WIDGET_SEARCH, placeholder=L_("Search Query"))
 
--- a/MoinMoin/items/__init__.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/items/__init__.py	Mon Feb 18 00:46:53 2013 +0100
@@ -49,11 +49,11 @@
     NAME, NAME_OLD, NAME_EXACT, WIKINAME, MTIME, SYSITEM_VERSION, ITEMTYPE,
     CONTENTTYPE, SIZE, ACTION, ADDRESS, HOSTNAME, USERID, COMMENT,
     HASH_ALGORITHM, ITEMID, REVID, DATAID, CURRENT, PARENTID
-    )
+)
 from MoinMoin.constants.contenttypes import CHARSET, CONTENTTYPE_NONEXISTENT
 from MoinMoin.constants.itemtypes import (
     ITEMTYPE_NONEXISTENT, ITEMTYPE_USERPROFILE, ITEMTYPE_DEFAULT,
-    )
+)
 
 from .content import content_registry, Content, NonExistentContent, Draw
 
@@ -318,7 +318,7 @@
             MTIME,
             ACTION,
             ADDRESS, HOSTNAME, USERID,
-            ]
+        ]
         for key in kill_keys:
             meta.pop(key, None)
         return meta
--- a/MoinMoin/items/_tests/test_Content.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/items/_tests/test_Content.py	Mon Feb 18 00:46:53 2013 +0100
@@ -32,7 +32,7 @@
                 (u'text/plain;charset=utf-8', Text),
                 (u'image/tiff', Image),
                 (u'image/png', TransformableBitmapImage),
-            ]:
+        ]:
             content = Content.create(contenttype)
             assert isinstance(content, ExpectedClass)
 
@@ -149,8 +149,8 @@
             # The assert statement works with both older and newer versions of Werkzeug
             # Probably not an intentional change on the werkzeug side, see issue:
             # https://github.com/mitsuhiko/werkzeug/issues/146
-            assert str(result).startswith('<img src="/+diffraw/image_Item?rev') or \
-                    str(result).startswith('<img src="/%2Bdiffraw/image_Item?rev')
+            assert (str(result).startswith('<img src="/+diffraw/image_Item?rev') or
+                    str(result).startswith('<img src="/%2Bdiffraw/image_Item?rev'))
         except ImportError:
             # no PIL
             pass
--- a/MoinMoin/items/_tests/test_Item.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/items/_tests/test_Item.py	Mon Feb 18 00:46:53 2013 +0100
@@ -42,10 +42,10 @@
         assert isinstance(item, NonExistent)
         meta, data = item.meta, item.content.data
         assert meta == {
-                ITEMTYPE: ITEMTYPE_NONEXISTENT,
-                CONTENTTYPE: CONTENTTYPE_NONEXISTENT,
-                NAME: u'DoesNotExist',
-                }
+            ITEMTYPE: ITEMTYPE_NONEXISTENT,
+            CONTENTTYPE: CONTENTTYPE_NONEXISTENT,
+            NAME: u'DoesNotExist',
+        }
         assert data == ''
 
     def testCRUD(self):
@@ -272,17 +272,16 @@
         assert item.content.data == u'another child'
 
     def test_rename_recursion_with_multiple_names_and_children(self):
-        update_item(u'Foo',
-                    {CONTENTTYPE: u'text/x.moin.wiki',
-                         NAME: [u'Other', u'Page', u'Foo']},
-                    u'Parent')
+        update_item(u'Foo', {
+            CONTENTTYPE: u'text/x.moin.wiki',
+            NAME: [u'Other', u'Page', u'Foo'],
+        }, u'Parent')
         update_item(u'Page/Child', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Page')
         update_item(u'Other/Child2', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Other')
-        update_item(u'Another',
-                    {CONTENTTYPE: u'text/x.moin.wiki',
-                     NAME: [u'Another', u'Page/Second']
-                         },
-                    u'Both')
+        update_item(u'Another', {
+            CONTENTTYPE: u'text/x.moin.wiki',
+            NAME: [u'Another', u'Page/Second'],
+        }, u'Both')
         update_item(u'Page/Second/Child', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Second')
         update_item(u'Another/Child', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Another')
 
--- a/MoinMoin/items/content.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/items/content.py	Mon Feb 18 00:46:53 2013 +0100
@@ -66,7 +66,7 @@
 from MoinMoin.constants.contenttypes import (
     GROUP_MARKUP_TEXT, GROUP_OTHER_TEXT, GROUP_IMAGE, GROUP_AUDIO, GROUP_VIDEO,
     GROUP_DRAWING, GROUP_OTHER, CONTENTTYPE_NONEXISTENT, CHARSET
-    )
+)
 from MoinMoin.constants.keys import NAME_EXACT, WIKINAME, CONTENTTYPE, SIZE, TAGS, HASH_ALGORITHM
 
 
@@ -200,8 +200,7 @@
             input_conv = reg.get(Type(self.contenttype), type_moin_document)
             if not input_conv:
                 raise TypeError("We cannot handle the conversion from {0} to the DOM tree".format(self.contenttype))
-            smiley_conv = reg.get(type_moin_document, type_moin_document,
-                    icon='smiley')
+            smiley_conv = reg.get(type_moin_document, type_moin_document, icon='smiley')
 
             # We can process the conversion
             links = Iri(scheme='wiki', authority='', path='/' + self.name)
@@ -964,9 +963,9 @@
 
         # We determine the different namespaces of the output form
         output_namespaces = {
-             docbook.namespace: '',
-             xlink.namespace: 'xlink',
-         }
+            docbook.namespace: '',
+            xlink.namespace: 'xlink',
+        }
 
         # We convert the result into a StringIO object
         # With the appropriate namespace
--- a/MoinMoin/macro/Date.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/macro/Date.py	Mon Feb 18 00:46:53 2013 +0100
@@ -24,7 +24,7 @@
         :returns: UNIX timestamp (UTC)
         """
         if (len(args) >= 19 and args[4] == '-' and args[7] == '-' and
-              args[10] == 'T' and args[13] == ':' and args[16] == ':'):
+            args[10] == 'T' and args[13] == ':' and args[16] == ':'):
             # we ignore any time zone offsets here, assume UTC,
             # and accept (and ignore) any trailing stuff
             try:
--- a/MoinMoin/mail/_tests/test_sendmail.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/mail/_tests/test_sendmail.py	Mon Feb 18 00:46:53 2013 +0100
@@ -35,7 +35,7 @@
          'FirstnameLastname@example.net'),
         ('first.last@example.com', 'first.last@example.com'),
         ('first . last @ example . com', 'first.last@example.com'),
-        )
+    )
 
     def testDecodeSpamSafeMail(self):
         """mail.sendmail: decoding spam safe mail"""
@@ -56,7 +56,7 @@
          'firstname DOT lastname AT example DOT net'),
         ('F.Lastname@example.net',
          'f DOT lastname AT example DOT net'),
-        )
+    )
 
     def testEncodeSpamSafeMail(self):
         """mail.sendmail: encoding mail address to spam safe mail"""
--- a/MoinMoin/mail/sendmail.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/mail/sendmail.py	Mon Feb 18 00:46:53 2013 +0100
@@ -171,8 +171,8 @@
         except (os.error, socket.error) as e:
             logging.exception("smtp mail failed with an exception.")
             return (0, _("Connection to mailserver '%(server)s' failed: %(reason)s",
-                server=cfg.mail_smarthost,
-                reason=str(e)
+                    server=cfg.mail_smarthost,
+                    reason=str(e)
             ))
     else:
         try:
--- a/MoinMoin/script/account/resetpw.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/script/account/resetpw.py	Mon Feb 18 00:46:53 2013 +0100
@@ -50,11 +50,11 @@
         Option('--password', '-p', required=False, dest='password', type=unicode,
                help='New password for this account.'),
         Option('--all-users', '-a', required=False, dest='all_users', action='store_true', default=False,
-            help='Reset password for ALL users.'),
+               help='Reset password for ALL users.'),
         Option('--notify', '-N', required=False, dest='notify', action='store_true', default=False,
-            help='Notify user(s), send them an E-Mail with a password reset link.'),
+               help='Notify user(s), send them an E-Mail with a password reset link.'),
         Option('--verbose', '-v', required=False, dest='verbose', action='store_true', default=False,
-            help='Verbose operation'),
+               help='Verbose operation'),
     )
 
     def run(self, name, uid, password, all_users, notify, verbose):
--- a/MoinMoin/script/maint/index.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/script/maint/index.py	Mon Feb 18 00:46:53 2013 +0100
@@ -20,7 +20,7 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
     ]
 
     def run(self, tmp):
@@ -32,7 +32,7 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
     ]
 
     def run(self, tmp):
@@ -44,11 +44,11 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
         Option('--procs', '-p', required=False, dest='procs', type=int, default=1,
-            help='Number of processors the writer will use.'),
+               help='Number of processors the writer will use.'),
         Option('--limitmb', '-l', required=False, dest='limitmb', type=int, default=10,
-            help='Maximum memory (in megabytes) each index-writer will use for the indexing pool.'),
+               help='Maximum memory (in megabytes) each index-writer will use for the indexing pool.'),
     ]
 
     def run(self, tmp, procs, limitmb):
@@ -60,7 +60,7 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
     ]
 
     def run(self, tmp):
@@ -82,7 +82,7 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
     ]
 
     def run(self, tmp):
@@ -94,7 +94,7 @@
 
     option_list = [
         Option('--tmp', action="store_true", required=False, dest='tmp', default=False,
-            help='use the temporary location.'),
+               help='use the temporary location.'),
     ]
 
     def run(self, tmp):
--- a/MoinMoin/script/maint/modify_item.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/script/maint/modify_item.py	Mon Feb 18 00:46:53 2013 +0100
@@ -18,13 +18,13 @@
     description = 'Get an item revision from the wiki.'
     option_list = (
         Option('--name', '-n', dest='name', type=unicode, required=True,
-            help='Name of the item to get.'),
+               help='Name of the item to get.'),
         Option('--revid', '-r', dest='revid', type=unicode, required=False, default=CURRENT,
-            help='Revision ID of the revision to get (default: current rev).'),
+               help='Revision ID of the revision to get (default: current rev).'),
         Option('--meta', '-m', dest='meta_file', type=unicode, required=True,
-            help='Filename of file to create for the metadata.'),
+               help='Filename of file to create for the metadata.'),
         Option('--data', '-d', dest='data_file', type=unicode, required=True,
-            help='Filename of file to create for the data.'),
+               help='Filename of file to create for the data.'),
     )
 
     def run(self, name, meta_file, data_file, revid):
@@ -42,11 +42,11 @@
     description = 'Put an item revision into the wiki.'
     option_list = (
         Option('--meta', '-m', dest='meta_file', type=unicode, required=True,
-            help='Filename of file to read as metadata.'),
+               help='Filename of file to read as metadata.'),
         Option('--data', '-d', dest='data_file', type=unicode, required=True,
-            help='Filename of file to read as data.'),
+               help='Filename of file to read as data.'),
         Option('--overwrite', '-o', action='store_true', dest='overwrite', default=False,
-            help='If given, overwrite existing revisions, if requested.'),
+               help='If given, overwrite existing revisions, if requested.'),
     )
 
     def run(self, meta_file, data_file, overwrite):
--- a/MoinMoin/script/maint/moinshell.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/script/maint/moinshell.py	Mon Feb 18 00:46:53 2013 +0100
@@ -39,12 +39,7 @@
         self.make_context = make_context
 
     def get_options(self):
-
-        return (
-                Option('--no-ipython',
-                       action="store_true",
-                       dest='no_ipython',
-                       default=not self.use_ipython), )
+        return (Option('--no-ipython', action="store_true", dest='no_ipython', default=not self.use_ipython), )
 
     def get_context(self):
         """
--- a/MoinMoin/search/_tests/test_analyzers.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/search/_tests/test_analyzers.py	Mon Feb 18 00:46:53 2013 +0100
@@ -29,94 +29,80 @@
         # (query, tokens)
         (u'-MinusGuy:read', [u'MinusGuy:-read']),
         (u'+PlusGuy:read', [u'PlusGuy:+read']),
-        (u'Admin3:read,write,admin',
-            [
-             u'Admin3:+read',
-             u'Admin3:-pubread',
-             u'Admin3:+write',
-             u'Admin3:-create',
-             u'Admin3:+admin',
-             u'Admin3:-destroy',
-            ]
-        ),
-        (u'Admin1,Admin2:read,write,admin',
-            [
-             u'Admin1:+read',
-             u'Admin1:-pubread',
-             u'Admin1:+write',
-             u'Admin1:-create',
-             u'Admin1:+admin',
-             u'Admin1:-destroy',
-             u'Admin2:+read',
-             u'Admin2:-pubread',
-             u'Admin2:+write',
-             u'Admin2:-create',
-             u'Admin2:+admin',
-             u'Admin2:-destroy',
-            ]
-        ),
-        (u'JoeDoe:pubread,write',
-            [
-             u'JoeDoe:-read',
-             u'JoeDoe:+pubread',
-             u'JoeDoe:+write',
-             u'JoeDoe:-create',
-             u'JoeDoe:-admin',
-             u'JoeDoe:-destroy',
-            ]
-        ),
-        (u'name with spaces,another one:read,write',
-            [
-             u'name with spaces:+read',
-             u'name with spaces:-pubread',
-             u'name with spaces:+write',
-             u'name with spaces:-create',
-             u'name with spaces:-admin',
-             u'name with spaces:-destroy',
-             u'another one:+read',
-             u'another one:-pubread',
-             u'another one:+write',
-             u'another one:-create',
-             u'another one:-admin',
-             u'another one:-destroy',
-            ]
-        ),
-        (u'CamelCase,extended name:read,write',
-            [
-             u'CamelCase:+read',
-             u'CamelCase:-pubread',
-             u'CamelCase:+write',
-             u'CamelCase:-create',
-             u'CamelCase:-admin',
-             u'CamelCase:-destroy',
-             u'extended name:+read',
-             u'extended name:-pubread',
-             u'extended name:+write',
-             u'extended name:-create',
-             u'extended name:-admin',
-             u'extended name:-destroy',
-            ]
-        ),
-        (u'BadGuy:',
-            [
-             u'BadGuy:-read',
-             u'BadGuy:-pubread',
-             u'BadGuy:-write',
-             u'BadGuy:-create',
-             u'BadGuy:-admin',
-             u'BadGuy:-destroy',
-            ]
-        ),
-        (u'All:read',
-            [
-             u'All:+read',
-             u'All:-pubread',
-             u'All:-write',
-             u'All:-create',
-             u'All:-admin',
-             u'All:-destroy',
-            ]
-        )
+        (u'Admin3:read,write,admin', [
+            u'Admin3:+read',
+            u'Admin3:-pubread',
+            u'Admin3:+write',
+            u'Admin3:-create',
+            u'Admin3:+admin',
+            u'Admin3:-destroy',
+        ]),
+        (u'Admin1,Admin2:read,write,admin', [
+            u'Admin1:+read',
+            u'Admin1:-pubread',
+            u'Admin1:+write',
+            u'Admin1:-create',
+            u'Admin1:+admin',
+            u'Admin1:-destroy',
+            u'Admin2:+read',
+            u'Admin2:-pubread',
+            u'Admin2:+write',
+            u'Admin2:-create',
+            u'Admin2:+admin',
+            u'Admin2:-destroy',
+        ]),
+        (u'JoeDoe:pubread,write', [
+            u'JoeDoe:-read',
+            u'JoeDoe:+pubread',
+            u'JoeDoe:+write',
+            u'JoeDoe:-create',
+            u'JoeDoe:-admin',
+            u'JoeDoe:-destroy',
+        ]),
+        (u'name with spaces,another one:read,write', [
+            u'name with spaces:+read',
+            u'name with spaces:-pubread',
+            u'name with spaces:+write',
+            u'name with spaces:-create',
+            u'name with spaces:-admin',
+            u'name with spaces:-destroy',
+            u'another one:+read',
+            u'another one:-pubread',
+            u'another one:+write',
+            u'another one:-create',
+            u'another one:-admin',
+            u'another one:-destroy',
+        ]),
+        (u'CamelCase,extended name:read,write', [
+            u'CamelCase:+read',
+            u'CamelCase:-pubread',
+            u'CamelCase:+write',
+            u'CamelCase:-create',
+            u'CamelCase:-admin',
+            u'CamelCase:-destroy',
+            u'extended name:+read',
+            u'extended name:-pubread',
+            u'extended name:+write',
+            u'extended name:-create',
+            u'extended name:-admin',
+            u'extended name:-destroy',
+        ]),
+        (u'BadGuy:', [
+            u'BadGuy:-read',
+            u'BadGuy:-pubread',
+            u'BadGuy:-write',
+            u'BadGuy:-create',
+            u'BadGuy:-admin',
+            u'BadGuy:-destroy',
+        ]),
+        (u'All:read', [
+            u'All:+read',
+            u'All:-pubread',
+            u'All:-write',
+            u'All:-create',
+            u'All:-admin',
+            u'All:-destroy',
+        ])
     ]
 
     def make_tokenizer(self):
@@ -127,22 +113,20 @@
     """ analyzers: test content type analyzer """
 
     test_cases_query = [
-                  # (query, tokens)
-                  (u'text/plain',
-                   [u'text/plain', u'text', u'plain']),
-                  (u'text/plain;charset=utf-8',
-                   [u'text/plain;charset=utf-8', u'text', u'plain', u'charset=utf-8']),
-                  (u'text/html;value1=foo;value2=bar',
-                   [u'text/html;value1=foo;value2=bar', u'text', u'html', u'value1=foo', u'value2=bar'],
-                  ),
-                  # we normalize, sort the params:
-                  (u'text/html;value2=bar;value1=foo',
-                   [u'text/html;value1=foo;value2=bar', u'text', u'html', u'value1=foo', u'value2=bar'],
-                  ),
-                  # later values for same key overwrite earlier ones:
-                  (u'text/html;value1=foo;value1=bar',
-                   [u'text/html;value1=bar', u'text', u'html', u'value1=bar'])
-                 ]
+        # (query, tokens)
+        (u'text/plain',
+         [u'text/plain', u'text', u'plain']),
+        (u'text/plain;charset=utf-8',
+         [u'text/plain;charset=utf-8', u'text', u'plain', u'charset=utf-8']),
+        (u'text/html;value1=foo;value2=bar',
+         [u'text/html;value1=foo;value2=bar', u'text', u'html', u'value1=foo', u'value2=bar']),
+        # we normalize, sort the params:
+        (u'text/html;value2=bar;value1=foo',
+         [u'text/html;value1=foo;value2=bar', u'text', u'html', u'value1=foo', u'value2=bar']),
+        # later values for same key overwrite earlier ones:
+        (u'text/html;value1=foo;value1=bar',
+         [u'text/html;value1=bar', u'text', u'html', u'value1=bar'])
+    ]
 
     def make_tokenizer(self):
         return MimeTokenizer()
@@ -152,19 +136,20 @@
     """ analyzers: test item_name analyzer """
 
     test_cases_query = [
-                  # (query, tokens)
-                  (u'wifi', [u'wifi']),
-                  (u'WiFi', [u'wi', u'fi']),
-                  (u'Wi-Fi', [u'wi', u'fi']),
-                  (u'some item name', [u'some', u'item', u'name']),
-                  (u'SomeItem/SubItem', [u'some', u'item', u'sub', u'item']),
-                  (u'GSOC2011', [u'gsoc', u'2011'])
-                 ]
+        # (query, tokens)
+        (u'wifi', [u'wifi']),
+        (u'WiFi', [u'wi', u'fi']),
+        (u'Wi-Fi', [u'wi', u'fi']),
+        (u'some item name', [u'some', u'item', u'name']),
+        (u'SomeItem/SubItem', [u'some', u'item', u'sub', u'item']),
+        (u'GSOC2011', [u'gsoc', u'2011'])
+    ]
 
-    test_cases_index = [(u'some item name', [u'some', u'item', u'name']),
-                        (u'SomeItem/SubItem', [u'some', u'item', u'sub', u'item', u'someitemsubitem']),
-                        (u'GSOC2011', [u'gsoc', u'2011'])
-                       ]
+    test_cases_index = [
+        (u'some item name', [u'some', u'item', u'name']),
+        (u'SomeItem/SubItem', [u'some', u'item', u'sub', u'item', u'someitemsubitem']),
+        (u'GSOC2011', [u'gsoc', u'2011'])
+    ]
 
     def make_tokenizer(self):
         return item_name_analyzer()
--- a/MoinMoin/security/_tests/test_security.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/security/_tests/test_security.py	Mon Feb 18 00:46:53 2013 +0100
@@ -224,7 +224,7 @@
             "CamelCase,extended name:read,write  "
             "BadGuy:  "
             "All:read  "
-            ]
+        ]
         acl = AccessControlList(acl_rights, valid=app.cfg.acl_rights_contents)
 
         # Should apply these rights:
@@ -250,7 +250,7 @@
             # with ACL modifiers
             ('MinusGuy', ()),
             ('PlusGuy', ('read', )),
-            )
+        )
 
         # Check rights
         for user, may in users:
@@ -287,7 +287,7 @@
         acl_rights = [
             "PGroup,AllGroup:read,write,admin "
             "AGroup:read "
-            ]
+        ]
         acl = AccessControlList(acl_rights, valid=app.cfg.acl_rights_contents)
 
         # Should apply these rights:
@@ -296,7 +296,7 @@
             ('Antony', ('read', 'write', 'admin', )),  # in PGroup
             ('Beatrice', ('read', 'write', 'admin', )),  # in PGroup
             ('Charles', ('read', )),  # virtually in AGroup
-            )
+        )
 
         # Check rights
         for user, may in users:
@@ -492,7 +492,7 @@
         (p2, None, p2),  # default acl effective (also for children)
         (c2, None, c2),  # no own acl -> inherit from parent
         (c12, None, c12),  # no own acl -> inherit from parents
-        ]
+    ]
 
     from MoinMoin._tests import wikiconfig
 
--- a/MoinMoin/security/_tests/test_textcha.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/security/_tests/test_textcha.py	Mon Feb 18 00:46:53 2013 +0100
@@ -16,10 +16,12 @@
     """ Test: class TextCha """
     def setup_method(self, method):
         cfg = app.cfg
-        cfg.textchas = {'test_user_locale':
-                            {'Good Question': 'Good Answer',
-                            'What is the question?': 'Test_Answer'}
-                       }
+        cfg.textchas = {
+            'test_user_locale': {
+                'Good Question': 'Good Answer',
+                'What is the question?': 'Test_Answer',
+            }
+        }
         cfg.secrets['security/textcha'] = "test_secret"
         flaskg.user.profile[LOCALE] = 'test_user_locale'
 
@@ -38,8 +40,10 @@
 
         # test for textcha
         test_textchas = textcha_obj.textchas
-        expected_textchas = {'Good Question': 'Good Answer',
-                             'What is the question?': 'Test_Answer'}
+        expected_textchas = {
+            'Good Question': 'Good Answer',
+            'What is the question?': 'Test_Answer',
+        }
         assert test_textchas == expected_textchas
         # test for the question
         test_question = textcha_obj.question
@@ -90,9 +94,9 @@
     """ Test: class TextChaValid """
     def setup_method(self, method):
         cfg = app.cfg
-        cfg.textchas = {'test_user_locale':
-                            {'Good Question': 'Good Answer'}
-                       }
+        cfg.textchas = {
+            'test_user_locale': {'Good Question': 'Good Answer'}
+        }
         cfg.secrets['security/textcha'] = "test_secret"
         flaskg.user.profile[LOCALE] = 'test_user_locale'
 
--- a/MoinMoin/storage/__init__.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/storage/__init__.py	Mon Feb 18 00:46:53 2013 +0100
@@ -42,9 +42,9 @@
 def create_mapping(uri, namespaces, backends, acls):
     namespace_mapping = namespaces.items()
     acl_mapping = acls.items()
-    backend_mapping = [(backend_name,
-                        backend_from_uri(uri % dict(backend=backend_name, kind="%(kind)s")))
-                        for backend_name in backends]
+    backend_mapping = [
+        (backend_name, backend_from_uri(uri % dict(backend=backend_name, kind="%(kind)s")))
+        for backend_name in backends]
     # we need the longest mountpoints first, shortest last (-> '' is very last)
     namespace_mapping = sorted(namespace_mapping, key=lambda x: len(x[0]), reverse=True)
     acl_mapping = sorted(acl_mapping, key=lambda x: len(x[0]), reverse=True)
--- a/MoinMoin/storage/backends/_tests/__init__.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/storage/backends/_tests/__init__.py	Mon Feb 18 00:46:53 2013 +0100
@@ -113,10 +113,10 @@
 
     def test_iter(self):
         mds = [  # (metadata items, data str)
-                (dict(name='one'), 'ONE'),
-                (dict(name='two'), 'TWO'),
-                (dict(name='three'), 'THREE'),
-              ]
+            (dict(name='one'), 'ONE'),
+            (dict(name='two'), 'TWO'),
+            (dict(name='three'), 'THREE'),
+        ]
         expected_result = set()
         for m, d in mds:
             k = self.be.store(m, StringIO(d))
--- a/MoinMoin/storage/backends/_tests/test_fileserver.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/storage/backends/_tests/test_fileserver.py	Mon Feb 18 00:46:53 2013 +0100
@@ -52,9 +52,9 @@
         # note: as we can only store the data into the file system, meta can
         # only have items that are generated by the fileserver backend:
         items = [  # name,  meta,   data
-                 (u'foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
-                 (u'bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
-                ]
+            (u'foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
+            (u'bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
+        ]
         expected_result = self._prepare(items)
         dir_meta = tuple(sorted(dict(name=u'', size=0, contenttype=u'text/x.moin.wiki;charset=utf-8').items()))
         dir_data = """\
@@ -81,9 +81,9 @@
         # note: as we can only store the data into the file system, meta can
         # only have items that are generated by the fileserver backend:
         items = [  # name,  meta,   data
-                 (u'dir/foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
-                 (u'dir/bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
-                ]
+            (u'dir/foo.png', dict(size=11, contenttype=u'image/png'), 'png content'),
+            (u'dir/bar.txt', dict(size=12, contenttype=u'text/plain'), 'text content'),
+        ]
         expected_result = self._prepare(items)
         dir_meta = tuple(sorted(dict(name=u'', size=0, contenttype=u'text/x.moin.wiki;charset=utf-8').items()))
         dir_data = """\
--- a/MoinMoin/storage/middleware/indexing.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/storage/middleware/indexing.py	Mon Feb 18 00:46:53 2013 +0100
@@ -64,8 +64,7 @@
 
 from whoosh.fields import Schema, TEXT, ID, IDLIST, NUMERIC, DATETIME, KEYWORD, BOOLEAN
 from whoosh.writing import AsyncWriter
-from whoosh.qparser import QueryParser, MultifieldParser, RegexPlugin, \
-                           PseudoFieldPlugin
+from whoosh.qparser import QueryParser, MultifieldParser, RegexPlugin, PseudoFieldPlugin
 from whoosh.qparser import WordNode
 from whoosh.query import Every, Term
 from whoosh.sorting import FieldFacet
--- a/MoinMoin/storage/stores/_tests/conftest.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/storage/stores/_tests/conftest.py	Mon Feb 18 00:46:53 2013 +0100
@@ -33,15 +33,12 @@
 constructors = {
     'memory': lambda store, _: store(),
     'fs': lambda store, tmpdir: store(str(tmpdir.join('store'))),
-    'sqlite': lambda store, tmpdir: store(str(tmpdir.join('store.sqlite')),
-                                          'test_table', compression_level=0),
-    'sqlite:compressed': lambda store, tmpdir: store(str(tmpdir.join('store.sqlite')),
-                                          'test_table', compression_level=1),
+    'sqlite': lambda store, tmpdir: store(str(tmpdir.join('store.sqlite')), 'test_table', compression_level=0),
+    'sqlite:compressed': lambda store, tmpdir: store(str(tmpdir.join('store.sqlite')), 'test_table', compression_level=1),
     'kc': lambda store, tmpdir: store(str(tmpdir.join('store.kch'))),
     'kt': lambda store, _: store(),
     'mongodb': lambda store, _: store(),
-    'sqla': lambda store, tmpdir: store('sqlite:///{0!s}'.format(tmpdir.join('store.sqlite')),
-                                        'test_table'),
+    'sqla': lambda store, tmpdir: store('sqlite:///{0!s}'.format(tmpdir.join('store.sqlite')), 'test_table'),
 }
 
 
--- a/MoinMoin/themes/__init__.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/themes/__init__.py	Mon Feb 18 00:46:53 2013 +0100
@@ -410,22 +410,22 @@
     # datetimeformat, dateformat, timeformat, timedeltaformat
 
     app.jinja_env.globals.update({
-                            # please note that flask-babel/jinja2.ext installs:
-                            # _, gettext, ngettext
-                            'isinstance': isinstance,
-                            'list': list,
-                            'Type': Type,
-                            # please note that flask-themes installs:
-                            # theme, theme_static
-                            'theme_supp': ThemeSupport(app.cfg),
-                            'user': flaskg.user,
-                            'storage': flaskg.storage,
-                            'clock': flaskg.clock,
-                            'cfg': app.cfg,
-                            'item_name': u'handlers need to give it',
-                            'url_for_item': url_for_item,
-                            'get_editor_info': lambda meta: get_editor_info(meta),
-                            'utctimestamp': lambda dt: utctimestamp(dt),
-                            'gen': make_generator(),
-                            'search_form': SearchForm.from_defaults(),
-                            })
+        # please note that flask-babel/jinja2.ext installs:
+        # _, gettext, ngettext
+        'isinstance': isinstance,
+        'list': list,
+        'Type': Type,
+        # please note that flask-themes installs:
+        # theme, theme_static
+        'theme_supp': ThemeSupport(app.cfg),
+        'user': flaskg.user,
+        'storage': flaskg.storage,
+        'clock': flaskg.clock,
+        'cfg': app.cfg,
+        'item_name': u'handlers need to give it',
+        'url_for_item': url_for_item,
+        'get_editor_info': lambda meta: get_editor_info(meta),
+        'utctimestamp': lambda dt: utctimestamp(dt),
+        'gen': make_generator(),
+        'search_form': SearchForm.from_defaults(),
+    })
--- a/MoinMoin/user.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/user.py	Mon Feb 18 00:46:53 2013 +0100
@@ -753,8 +753,7 @@
 
 If you didn't forget your password, please ignore this email.
 
-""", link=url_for('frontend.recoverpass',
-                        username=self.name0, token=token, _external=True))
+""", link=url_for('frontend.recoverpass', username=self.name0, token=token, _external=True))
 
         subject = _('[%(sitename)s] Your wiki password recovery link',
                     sitename=self._cfg.sitename or "Wiki")
@@ -774,8 +773,7 @@
 
 If you didn't create this account, please ignore this email.
 
-""", link=url_for('frontend.verifyemail',
-                        username=self.name0, token=token, _external=True))
+""", link=url_for('frontend.verifyemail', username=self.name0, token=token, _external=True))
 
         subject = _('[%(sitename)s] Please verify your email address',
                     sitename=self._cfg.sitename or "Wiki")
--- a/MoinMoin/util/_tests/test_interwiki.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/_tests/test_interwiki.py	Mon Feb 18 00:46:53 2013 +0100
@@ -28,7 +28,7 @@
                          'MoinMoin': 'http://moinmo.in/',
                          'OtherWiki': 'http://otherwiki.com/',
                          'OtherWiki:ns1': 'http://otherwiki.com/ns1/',
-                         'OtherWiki:ns1:ns2': 'http://otherwiki.com/ns1/ns2/'
+                         'OtherWiki:ns1:ns2': 'http://otherwiki.com/ns1/ns2/',
         }
 
     def test_url_for_item(self):
@@ -171,8 +171,7 @@
              '#       space     space\n'
              'foo bar\r\n'
              'ham spam # this is a valid description')
-        assert InterWikiMap.from_string(s).iwmap == dict(foo='bar',
-                                                                  ham='spam')
+        assert InterWikiMap.from_string(s).iwmap == dict(foo='bar', ham='spam')
         # test for valid strings
         s = ('link1 http://link1.com/\r\n'
              'link2 http://link2.in/\r\n')
--- a/MoinMoin/util/_tests/test_mimetype.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/_tests/test_mimetype.py	Mon Feb 18 00:46:53 2013 +0100
@@ -17,11 +17,11 @@
         MimeType_obj = mimetype.MimeType(filename='test_file.jpg')
         # format in PARSER_TEXT_MIMETYPE
         test = [
-        #test_format, test_mimetype
-        ('html', ('text', 'html')),
-        ('css', ('text', 'css')),
-        ('python', ('text', 'python')),
-        ('latex', ('text', 'latex'))
+            #test_format, test_mimetype
+            ('html', ('text', 'html')),
+            ('css', ('text', 'css')),
+            ('python', ('text', 'python')),
+            ('latex', ('text', 'latex')),
         ]
 
         for test_format, test_mimetype in test:
@@ -30,10 +30,10 @@
 
         # format not in PARSER_TEXT_MIMETYPE
         test = [
-        # test_format, test_mimetype
-        ('wiki', ('text', 'x.moin.wiki')),
-        ('irc', ('text', 'irssi')),
-        ('test_random', ('text', 'x-test_random'))
+            # test_format, test_mimetype
+            ('wiki', ('text', 'x.moin.wiki')),
+            ('irc', ('text', 'irssi')),
+            ('test_random', ('text', 'x-test_random')),
         ]
 
         for test_format, test_mimetype in test:
@@ -42,14 +42,14 @@
 
     def test_mime_type(self):
         test = [
-        # test_extension, test_major/minor
-        ('.mpeg', 'video/mpeg'),
-        ('.pdf', 'application/pdf'),
-        ('.txt', 'text/plain'),
-        ('.jpeg', 'image/jpeg'),
-        ('.png', 'image/png'),
-        ('.svg', 'image/svg+xml'),
-        ('', 'application/octet-stream')
+            # test_extension, test_major/minor
+            ('.mpeg', 'video/mpeg'),
+            ('.pdf', 'application/pdf'),
+            ('.txt', 'text/plain'),
+            ('.jpeg', 'image/jpeg'),
+            ('.png', 'image/png'),
+            ('.svg', 'image/svg+xml'),
+            ('', 'application/octet-stream'),
         ]
 
         # when mimestr is None
--- a/MoinMoin/util/_tests/test_paramparser.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/_tests/test_paramparser.py	Mon Feb 18 00:46:53 2013 +0100
@@ -16,54 +16,54 @@
         abcd = [u'a', u'b', u'c', u'd']
         abcd_dict = {u'a': u'1', u'b': u'2', u'c': u'3', u'd': u'4'}
         tests = [
-                  # regular and quoting tests
-                  (u'd = 4,c=3,b=2,a= 1 ',    ([], abcd_dict, [])),
-                  (u'a,b,c,d',                (abcd, {}, [])),
-                  (u' a , b , c , d ',        (abcd, {}, [])),
-                  (u'   a   ',                ([u'a'], {}, [])),
-                  (u'"  a  "',                ([u'  a  '], {}, [])),
-                  (u'a,b,c,d, "a,b,c,d"',     (abcd + [u'a,b,c,d'], {}, [])),
-                  (u'quote " :), b',          ([u'quote " :)', u'b'], {}, [])),
-                  (u'"quote "" :)", b',       ([u'quote " :)', u'b'], {}, [])),
-                  (u'=7',                     ([], {u'': u'7'}, [])),
-                  (u',,',                     ([None, None, None], {}, [])),
-                  (u',"",',                   ([None, u'', None], {}, [])),
-                  (u',"", ""',                ([None, u'', u''], {}, [])),
-                  (u'  ""  ,"", ""',          ([u'', u'', u''], {}, [])),
-                  # some name=value test
-                  (u'd = 4,c=3,b=2,a= 1 ',    ([], abcd_dict, [])),
-                  (u'd=d,e="a,b,c,d"',        ([], {u'd': u'd',
-                                                    u'e': u'a,b,c,d'}, [])),
-                  (u'd = d,e = "a,b,c,d"',    ([], {u'd': u'd',
-                                                    u'e': u'a,b,c,d'}, [])),
-                  (u'd = d, e = "a,b,c,d"',   ([], {u'd': u'd',
-                                                    u'e': u'a,b,c,d'}, [])),
-                  (u'd = , e = "a,b,c,d"',    ([], {u'd': None,
-                                                    u'e': u'a,b,c,d'}, [])),
-                  (u'd = "", e = "a,b,c,d"',  ([], {u'd': u'',
-                                                    u'e': u'a,b,c,d'}, [])),
-                  (u'd = "", e = ',           ([], {u'd': u'', u'e': None},
-                                               [])),
-                  (u'd=""',                   ([], {u'd': u''}, [])),
-                  (u'd = "", e = ""',         ([], {u'd': u'', u'e': u''},
-                                               [])),
-                  # no, None as key isn't accepted
-                  (u' = "",  e = ""',         ([], {u'': u'', u'e': u''},
-                                               [])),
-                  # can quote both name and value:
-                  (u'd = d," e "= "a,b,c,d"', ([], {u'd': u'd',
-                                                    u' e ': u'a,b,c,d'}, [])),
-                  # trailing args
-                  (u'1,2,a=b,3,4',            ([u'1', u'2'], {u'a': u'b'},
-                                               [u'3', u'4'])),
-                  # can quote quotes:
-                  (u'd = """d"',              ([], {u'd': u'"d'}, [])),
-                  (u'd = """d"""',            ([], {u'd': u'"d"'}, [])),
-                  (u'd = "d"" ", e=7',        ([], {u'd': u'd" ', u'e': u'7'},
-                                               [])),
-                  (u'd = "d""", e=8',         ([], {u'd': u'd"', u'e': u'8'},
-                                               [])),
-                ]
+            # regular and quoting tests
+            (u'd = 4,c=3,b=2,a= 1 ',    ([], abcd_dict, [])),
+            (u'a,b,c,d',                (abcd, {}, [])),
+            (u' a , b , c , d ',        (abcd, {}, [])),
+            (u'   a   ',                ([u'a'], {}, [])),
+            (u'"  a  "',                ([u'  a  '], {}, [])),
+            (u'a,b,c,d, "a,b,c,d"',     (abcd + [u'a,b,c,d'], {}, [])),
+            (u'quote " :), b',          ([u'quote " :)', u'b'], {}, [])),
+            (u'"quote "" :)", b',       ([u'quote " :)', u'b'], {}, [])),
+            (u'=7',                     ([], {u'': u'7'}, [])),
+            (u',,',                     ([None, None, None], {}, [])),
+            (u',"",',                   ([None, u'', None], {}, [])),
+            (u',"", ""',                ([None, u'', u''], {}, [])),
+            (u'  ""  ,"", ""',          ([u'', u'', u''], {}, [])),
+            # some name=value test
+            (u'd = 4,c=3,b=2,a= 1 ',    ([], abcd_dict, [])),
+            (u'd=d,e="a,b,c,d"',        ([], {u'd': u'd',
+                                              u'e': u'a,b,c,d'}, [])),
+            (u'd = d,e = "a,b,c,d"',    ([], {u'd': u'd',
+                                              u'e': u'a,b,c,d'}, [])),
+            (u'd = d, e = "a,b,c,d"',   ([], {u'd': u'd',
+                                              u'e': u'a,b,c,d'}, [])),
+            (u'd = , e = "a,b,c,d"',    ([], {u'd': None,
+                                              u'e': u'a,b,c,d'}, [])),
+            (u'd = "", e = "a,b,c,d"',  ([], {u'd': u'',
+                                              u'e': u'a,b,c,d'}, [])),
+            (u'd = "", e = ',           ([], {u'd': u'', u'e': None},
+                                         [])),
+            (u'd=""',                   ([], {u'd': u''}, [])),
+            (u'd = "", e = ""',         ([], {u'd': u'', u'e': u''},
+                                         [])),
+            # no, None as key isn't accepted
+            (u' = "",  e = ""',         ([], {u'': u'', u'e': u''},
+                                         [])),
+            # can quote both name and value:
+            (u'd = d," e "= "a,b,c,d"', ([], {u'd': u'd',
+                                              u' e ': u'a,b,c,d'}, [])),
+            # trailing args
+            (u'1,2,a=b,3,4',            ([u'1', u'2'], {u'a': u'b'},
+                                         [u'3', u'4'])),
+            # can quote quotes:
+            (u'd = """d"',              ([], {u'd': u'"d'}, [])),
+            (u'd = """d"""',            ([], {u'd': u'"d"'}, [])),
+            (u'd = "d"" ", e=7',        ([], {u'd': u'd" ', u'e': u'7'},
+                                         [])),
+            (u'd = "d""", e=8',         ([], {u'd': u'd"', u'e': u'8'},
+                                         [])),
+        ]
         for args, expected in tests:
             result = paramparser.parse_quoted_separated(args)
             assert expected == result
@@ -78,12 +78,12 @@
 
     def testLimited(self):
         tests = [
-                  # regular and quoting tests
-                  (u'd = 4,c=3,b=2,a= 1 ',    ([], {u'd': u'4',
-                                                    u'c': u'3,b=2,a= 1'}, [])),
-                  (u'a,b,c,d',                ([u'a', u'b,c,d'], {}, [])),
-                  (u'a=b,b,c,d',              ([], {u'a': u'b'}, [u'b,c,d'])),
-                ]
+            # regular and quoting tests
+            (u'd = 4,c=3,b=2,a= 1 ',    ([], {u'd': u'4',
+                                              u'c': u'3,b=2,a= 1'}, [])),
+            (u'a,b,c,d',                ([u'a', u'b,c,d'], {}, [])),
+            (u'a=b,b,c,d',              ([], {u'a': u'b'}, [u'b,c,d'])),
+        ]
         for args, expected in tests:
             result = paramparser.parse_quoted_separated(args, seplimit=1)
             assert expected == result
@@ -98,11 +98,11 @@
 
     def testDoubleNameValueSeparator(self):
         tests = [
-                  # regular and quoting tests
-                  (u'd==4,=3 ',    ([], {u'd': u'=4', u'': u'3'}, [])),
-                  (u'===a,b,c,d',  ([], {u'': u'==a'}, [u'b', u'c', u'd'])),
-                  (u'a,b,===,c,d', ([u'a', u'b'], {u'': u'=='}, [u'c', u'd'])),
-                ]
+            # regular and quoting tests
+            (u'd==4,=3 ',    ([], {u'd': u'=4', u'': u'3'}, [])),
+            (u'===a,b,c,d',  ([], {u'': u'==a'}, [u'b', u'c', u'd'])),
+            (u'a,b,===,c,d', ([u'a', u'b'], {u'': u'=='}, [u'c', u'd'])),
+        ]
 
         def _check(a, e):
             r = paramparser.parse_quoted_separated(a)
@@ -114,21 +114,21 @@
     def testNoNameValue(self):
         abcd = [u'a', u'b', u'c', u'd']
         tests = [
-                  # regular and quoting tests
-                  (u'd = 4,c=3,b=2,a= 1 ',    [u'd = 4', u'c=3',
-                                               u'b=2', u'a= 1']),
-                  (u'a,b,c,d',                abcd),
-                  (u' a , b , c , d ',        abcd),
-                  (u'   a   ',                [u'a']),
-                  (u'"  a  "',                [u'  a  ']),
-                  (u'a,b,c,d, "a,b,c,d"',     abcd + [u'a,b,c,d']),
-                  (u'quote " :), b',          [u'quote " :)', u'b']),
-                  (u'"quote "" :)", b',       [u'quote " :)', u'b']),
-                  (u'"unended quote',         [u'"unended quote']),
-                  (u'"',                      [u'"']),
-                  (u'd=d,e="a,b,c,d"',        [u'd=d', u'e="a', u'b',
-                                               u'c', u'd"']),
-                ]
+            # regular and quoting tests
+            (u'd = 4,c=3,b=2,a= 1 ',    [u'd = 4', u'c=3',
+                                         u'b=2', u'a= 1']),
+            (u'a,b,c,d',                abcd),
+            (u' a , b , c , d ',        abcd),
+            (u'   a   ',                [u'a']),
+            (u'"  a  "',                [u'  a  ']),
+            (u'a,b,c,d, "a,b,c,d"',     abcd + [u'a,b,c,d']),
+            (u'quote " :), b',          [u'quote " :)', u'b']),
+            (u'"quote "" :)", b',       [u'quote " :)', u'b']),
+            (u'"unended quote',         [u'"unended quote']),
+            (u'"',                      [u'"']),
+            (u'd=d,e="a,b,c,d"',        [u'd=d', u'e="a', u'b',
+                                         u'c', u'd"']),
+        ]
         for args, expected in tests:
             result = paramparser.parse_quoted_separated(args, name_value=False)
             assert expected == result
@@ -313,9 +313,9 @@
 
         def _check(args, sep, kwsep, err):
             pytest.raises(err,
-                           paramparser.parse_quoted_separated_ext,
-                           args, sep, kwsep,
-                           brackets=(u'<>', u'()'))
+                          paramparser.parse_quoted_separated_ext,
+                          args, sep, kwsep,
+                          brackets=(u'<>', u'()'))
 
         for test in tests:
             yield [_check] + list(test)
@@ -564,16 +564,16 @@
         ief(self._test_invoke_int_None, u'i=')
         ief(self._test_invoke_int_None, u'')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_int_None, u'x')
+                      self._test_invoke_int_None, u'x')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_int_None, u'""')
+                      self._test_invoke_int_None, u'""')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_int_None, u'i=""')
+                      self._test_invoke_int_None, u'i=""')
         pytest.raises(ValueError, ief,
-                       _test_invoke_int_fixed, u'a=7', [7, 8])
+                      _test_invoke_int_fixed, u'a=7', [7, 8])
         ief(_test_invoke_int_fixed, u'i=1', [7, 8])
         pytest.raises(ValueError, ief,
-                       _test_invoke_int_fixed, u'i=""', [7, 8])
+                      _test_invoke_int_fixed, u'i=""', [7, 8])
         ief(_test_invoke_int_fixed, u'i=', [7, 8])
 
         for choicefn in (self._test_invoke_choice, self._test_invoke_choicet):
@@ -582,20 +582,20 @@
             ief(choicefn, u'choice=', [7])
             ief(choicefn, u'choice="a"', [7])
             pytest.raises(ValueError, ief,
-                           choicefn, u'x', [7])
+                          choicefn, u'x', [7])
             pytest.raises(ValueError, ief,
-                           choicefn, u'choice=x', [7])
+                          choicefn, u'choice=x', [7])
 
         ief(self._test_invoke_float_None, u'i=1.4')
         ief(self._test_invoke_float_None, u'i=')
         ief(self._test_invoke_float_None, u'')
         ief(self._test_invoke_float_None, u'1.4')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_float_None, u'x')
+                      self._test_invoke_float_None, u'x')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_float_None, u'""')
+                      self._test_invoke_float_None, u'""')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_float_None, u'i=""')
+                      self._test_invoke_float_None, u'i=""')
         ief(self._test_trailing, u'a=7, a')
         ief(self._test_trailing, u'7, a')
         ief(self._test_arbitrary_kw, u'test=x, \xc3=test',
@@ -609,15 +609,15 @@
         ief(self._test_arbitrary_kw, u'7 \xc3=test, test= x ',
             [{u'7 \xc3': 'test', 'test': u'x'}])
         pytest.raises(ValueError, ief,
-                       self._test_invoke_float_required, u'')
+                      self._test_invoke_float_required, u'')
         ief(self._test_invoke_float_required, u'1.4')
         ief(self._test_invoke_float_required, u'i=1.4')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_choice_required, u'')
+                      self._test_invoke_choice_required, u'')
         ief(self._test_invoke_choice_required, u'a')
         ief(self._test_invoke_choice_required, u'i=a')
         pytest.raises(ValueError, ief,
-                       self._test_invoke_float_required, u',')
+                      self._test_invoke_float_required, u',')
 
     def testConstructors(self):
         ief = paramparser.invoke_extension_function
--- a/MoinMoin/util/_tests/test_pysupport.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/_tests/test_pysupport.py	Mon Feb 18 00:46:53 2013 +0100
@@ -27,13 +27,11 @@
 
     def testNonExistingModule(self):
         """ pysupport: import nonexistent module raises ImportError """
-        pytest.raises(ImportError, pysupport.importName,
-                       'MoinMoin.util.nonexistent', 'importName')
+        pytest.raises(ImportError, pysupport.importName, 'MoinMoin.util.nonexistent', 'importName')
 
     def testNonExistingAttribute(self):
         """ pysupport: import nonexistent attritbue raises AttributeError """
-        pytest.raises(AttributeError, pysupport.importName,
-                       'MoinMoin.util.pysupport', 'nonexistent')
+        pytest.raises(AttributeError, pysupport.importName, 'MoinMoin.util.pysupport', 'nonexistent')
 
     def testExisting(self):
         """ pysupport: import name from existing module """
@@ -73,10 +71,7 @@
         """ pysupport: import nonexistent wiki plugin fail """
         if self.pluginExists():
             pytest.skip('plugin exists: {0}'.format(self.plugin))
-        pytest.raises(plugins.PluginMissingError,
-                       plugins.importWikiPlugin,
-                           app.cfg, 'parser',
-                           self.plugin, 'Parser')
+        pytest.raises(plugins.PluginMissingError, plugins.importWikiPlugin, app.cfg, 'parser', self.plugin, 'Parser')
 
 
 class TestImportExisting(TestImportNameFromPlugin):
@@ -97,8 +92,7 @@
             self.createTestPlugin()
             # clear the plugin cache...
             app.cfg._site_plugin_lists = {}
-            parser = plugins.importWikiPlugin(app.cfg, 'parser',
-                                               self.plugin, 'Parser')
+            parser = plugins.importWikiPlugin(app.cfg, 'parser', self.plugin, 'Parser')
             assert getattr(parser, '__name__', None) == 'Parser'
             assert parser.key == self.key
         finally:
--- a/MoinMoin/util/iri.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/iri.py	Mon Feb 18 00:46:53 2013 +0100
@@ -62,8 +62,7 @@
 
     _overall_re = re.compile(overall_rules, re.X)
 
-    def __init__(self, _iri=None, _quoted=True,
-            scheme=None, authority=None, path=None, query=None, fragment=None):
+    def __init__(self, _iri=None, _quoted=True, scheme=None, authority=None, path=None, query=None, fragment=None):
         """
         @param _iri A full IRI in unicode
         @param scheme Scheme part of the IRI, overrides the same part of the IRI.
@@ -163,13 +162,13 @@
 
     def __repr__(self):
         return '{0}(scheme={1!r}, authority={2!r}, path={3!r}, query={4!r}, fragment={5!r})'.format(
-                self.__class__.__name__,
-                self.scheme,
-                self._authority,
-                self._path,
-                self._query,
-                self._fragment,
-                )
+            self.__class__.__name__,
+            self.scheme,
+            self._authority,
+            self._path,
+            self._query,
+            self._fragment,
+        )
 
     def __unicode__(self):
         ret = []
@@ -216,8 +215,7 @@
                     else:
                         new_path = self.path + new_path
 
-            return Iri(scheme=new_scheme, authority=new_authority, path=new_path,
-                    query=new_query, fragment=other.fragment)
+            return Iri(scheme=new_scheme, authority=new_authority, path=new_path, query=new_query, fragment=other.fragment)
 
         if isinstance(other, basestring):
             return self + Iri(other)
@@ -232,8 +230,7 @@
 
     def __set_scheme(self, value):
         self._scheme = unicode(value).lower()
-    scheme = property(__get_scheme, __set_scheme, __del_scheme,
-            """Scheme part of the IRI.""")
+    scheme = property(__get_scheme, __set_scheme, __del_scheme, """Scheme part of the IRI.""")
 
     def __del_authority(self):
         self._authority = None
@@ -245,8 +242,7 @@
         if value.__class__ is not IriAuthority:
             value = IriAuthority(value, False)
         self._authority = value
-    authority = property(__get_authority, __set_authority, __del_authority,
-            """Authority part of the IRI.""")
+    authority = property(__get_authority, __set_authority, __del_authority, """Authority part of the IRI.""")
 
     def __del_path(self):
         self._path = None
@@ -258,8 +254,7 @@
         if value.__class__ is not IriPath:
             value = IriPath(value, False)
         self._path = value
-    path = property(__get_path, __set_path, __del_path,
-            """Path part of the IRI.""")
+    path = property(__get_path, __set_path, __del_path, """Path part of the IRI.""")
 
     def __del_query(self):
         self._query = None
@@ -269,8 +264,7 @@
 
     def __set_query(self, value):
         self._query = IriQuery(value, False)
-    query = property(__get_query, __set_query, __del_query,
-            """Query part of the IRI.""")
+    query = property(__get_query, __set_query, __del_query, """Query part of the IRI.""")
 
     def __del_fragment(self):
         self._fragment = None
@@ -280,8 +274,7 @@
 
     def __set_fragment(self, value):
         self._fragment = IriFragment(value, False)
-    fragment = property(__get_fragment, __set_fragment, __del_fragment,
-            """Fragment part of the IRI.""")
+    fragment = property(__get_fragment, __set_fragment, __del_fragment, """Fragment part of the IRI.""")
 
 
 class _Value(unicode):
@@ -434,8 +427,7 @@
 
     _authority_re = re.compile(authority_rules, re.X)
 
-    def __init__(self, iri_authority=None, _quoted=True,
-            userinfo=None, host=None, port=None):
+    def __init__(self, iri_authority=None, _quoted=True, userinfo=None, host=None, port=None):
         self._userinfo = self._host = self.port = None
 
         if iri_authority:
@@ -458,8 +450,8 @@
             return unicode(self) == other
         if isinstance(other, IriAuthority):
             return self._userinfo == other._userinfo and \
-                    self._host == other._host and \
-                    self.port == other.port
+                self._host == other._host and \
+                self.port == other.port
         return NotImplemented
 
     def __nonzero__(self):
@@ -469,11 +461,11 @@
 
     def __repr__(self):
         return '{0}(userinfo={1!r}, host={2!r}, port={3!r})'.format(
-                self.__class__.__name__,
-                self._userinfo,
-                self._host,
-                self.port,
-                )
+            self.__class__.__name__,
+            self._userinfo,
+            self._host,
+            self.port,
+        )
 
     def __unicode__(self):
         return self.__get(self._userinfo, self._host)
@@ -630,9 +622,9 @@
 
     def __repr__(self):
         return '{0}({1!r})'.format(
-                self.__class__.__name__,
-                unicode(self),
-                )
+            self.__class__.__name__,
+            unicode(self),
+        )
 
     def _remove_dots(self, segments):
         if not segments or segments[0] != '':
--- a/MoinMoin/util/mimetype.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/mimetype.py	Mon Feb 18 00:46:53 2013 +0100
@@ -17,43 +17,43 @@
 mimetypes.init(mimetypes.knownfiles)
 
 MIMETYPES_MORE = {
- # OpenOffice 2.x & other open document stuff
- '.odt': 'application/vnd.oasis.opendocument.text',
- '.ods': 'application/vnd.oasis.opendocument.spreadsheet',
- '.odp': 'application/vnd.oasis.opendocument.presentation',
- '.odg': 'application/vnd.oasis.opendocument.graphics',
- '.odc': 'application/vnd.oasis.opendocument.chart',
- '.odf': 'application/vnd.oasis.opendocument.formula',
- '.odb': 'application/vnd.oasis.opendocument.database',
- '.odi': 'application/vnd.oasis.opendocument.image',
- '.odm': 'application/vnd.oasis.opendocument.text-master',
- '.ott': 'application/vnd.oasis.opendocument.text-template',
- '.ots': 'application/vnd.oasis.opendocument.spreadsheet-template',
- '.otp': 'application/vnd.oasis.opendocument.presentation-template',
- '.otg': 'application/vnd.oasis.opendocument.graphics-template',
- # some systems (like Mac OS X) don't have some of these:
- '.patch': 'text/x-diff',
- '.diff': 'text/x-diff',
- '.py': 'text/x-python',
- '.cfg': 'text/plain',
- '.conf': 'text/plain',
- '.irc': 'text/plain',
- '.md5': 'text/plain',
- '.csv': 'text/csv',
- '.rst': 'text/x-rst',
- '.flv': 'video/x-flv',
- '.wmv': 'video/x-ms-wmv',
- '.wma': 'audio/x-ms-wma',
- '.swf': 'application/x-shockwave-flash',
- '.awd': 'application/x-anywikidraw',
- '.twd': 'application/x-twikidraw',
- '.swd': 'application/x-svgdraw',
- '.dbx': 'application/docbook+xml',
- '.moin': 'text/x.moin.wiki',
- '.creole': 'text/x.moin.creole',
- '.mediawiki': 'text/x-mediawiki',
- '.ico': 'image/x-icon',
- '.svg': 'image/svg+xml'
+    # OpenOffice 2.x & other open document stuff
+    '.odt': 'application/vnd.oasis.opendocument.text',
+    '.ods': 'application/vnd.oasis.opendocument.spreadsheet',
+    '.odp': 'application/vnd.oasis.opendocument.presentation',
+    '.odg': 'application/vnd.oasis.opendocument.graphics',
+    '.odc': 'application/vnd.oasis.opendocument.chart',
+    '.odf': 'application/vnd.oasis.opendocument.formula',
+    '.odb': 'application/vnd.oasis.opendocument.database',
+    '.odi': 'application/vnd.oasis.opendocument.image',
+    '.odm': 'application/vnd.oasis.opendocument.text-master',
+    '.ott': 'application/vnd.oasis.opendocument.text-template',
+    '.ots': 'application/vnd.oasis.opendocument.spreadsheet-template',
+    '.otp': 'application/vnd.oasis.opendocument.presentation-template',
+    '.otg': 'application/vnd.oasis.opendocument.graphics-template',
+    # some systems (like Mac OS X) don't have some of these:
+    '.patch': 'text/x-diff',
+    '.diff': 'text/x-diff',
+    '.py': 'text/x-python',
+    '.cfg': 'text/plain',
+    '.conf': 'text/plain',
+    '.irc': 'text/plain',
+    '.md5': 'text/plain',
+    '.csv': 'text/csv',
+    '.rst': 'text/x-rst',
+    '.flv': 'video/x-flv',
+    '.wmv': 'video/x-ms-wmv',
+    '.wma': 'audio/x-ms-wma',
+    '.swf': 'application/x-shockwave-flash',
+    '.awd': 'application/x-anywikidraw',
+    '.twd': 'application/x-twikidraw',
+    '.swd': 'application/x-svgdraw',
+    '.dbx': 'application/docbook+xml',
+    '.moin': 'text/x.moin.wiki',
+    '.creole': 'text/x.moin.creole',
+    '.mediawiki': 'text/x-mediawiki',
+    '.ico': 'image/x-icon',
+    '.svg': 'image/svg+xml',
 }
 
 # add all mimetype patterns of pygments
--- a/MoinMoin/util/monkeypatch.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/monkeypatch.py	Mon Feb 18 00:46:53 2013 +0100
@@ -20,8 +20,7 @@
 
 class BaseRequestHandler(werkzeug.serving.BaseRequestHandler):
     def log(self, type, message, *args):
-        _log(type, "{0} {1}\n".format(self.address_string(),
-                                message % args))
+        _log(type, "{0} {1}\n".format(self.address_string(), message % args))
 
 werkzeug.serving.BaseRequestHandler = BaseRequestHandler
 werkzeug.serving.WSGIRequestHandler = BaseRequestHandler
--- a/MoinMoin/util/paramparser.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/paramparser.py	Mon Feb 18 00:46:53 2013 +0100
@@ -614,8 +614,7 @@
             if isinstance(default.argtype, (tuple, list)):
                 # treat choice specially and return None if no choice
                 # is given in the value
-                return get_choice(value, name, list(default.argtype),
-                       default_none=True)
+                return get_choice(value, name, list(default.argtype), default_none=True)
             else:
                 return _convert_arg(value, default.argtype, name)
         return value
--- a/MoinMoin/util/plugins.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/plugins.py	Mon Feb 18 00:46:53 2013 +0100
@@ -234,8 +234,5 @@
 
 Make sure your data directory path is correct, check permissions, and
 that the data/plugin directory has an __init__.py file.
-""" % {
-    'path': pdir,
-    'err': str(err),
-}
+""" % dict(path=pdir, err=str(err))
         raise error.ConfigurationError(msg)
--- a/MoinMoin/util/version.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/MoinMoin/util/version.py	Mon Feb 18 00:46:53 2013 +0100
@@ -32,13 +32,14 @@
     Also, we inherit all the comparison logic from tuple base class.
     """
     VERSION_RE = re.compile(
-        r"""(?P<major>\d+)
-            \.
-            (?P<minor>\d+)
-            \.
-            (?P<release>\d+)
-            (?P<additional>[abc]\d+)?""",
-            re.VERBOSE)
+        r"""
+        (?P<major>\d+)
+        \.
+        (?P<minor>\d+)
+        \.
+        (?P<release>\d+)
+        (?P<additional>[abc]\d+)?""",
+        re.VERBOSE)
 
     @classmethod
     def parse_version(cls, version):
--- a/setup.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/setup.py	Mon Feb 18 00:46:53 2013 +0100
@@ -63,18 +63,19 @@
     #             'MoinMoin.apps.misc.templates': 'MoinMoin/apps/misc/templates',
     #            },
 
-    package_data={'MoinMoin.translations': ['MoinMoin.pot', '*.po', ],
-                  'MoinMoin.static': ['*', ],
-                  'MoinMoin.themes.modernized': ['*', ],
-                  'MoinMoin.themes.foobar': ['*', ],
-                  'MoinMoin.templates': ['*.html', '*.xml', ],
-                  'MoinMoin.apps.admin.templates': ['*.html', ],
-                  'MoinMoin.apps.misc.templates': ['*.html', '*.txt', ],
-                 },
+    package_data={
+        'MoinMoin.translations': ['MoinMoin.pot', '*.po', ],
+        'MoinMoin.static': ['*', ],
+        'MoinMoin.themes.modernized': ['*', ],
+        'MoinMoin.themes.foobar': ['*', ],
+        'MoinMoin.templates': ['*.html', '*.xml', ],
+        'MoinMoin.apps.admin.templates': ['*.html', ],
+        'MoinMoin.apps.misc.templates': ['*.html', '*.txt', ],
+    },
     include_package_data=True,
     zip_safe=False,
     dependency_links=[
-        #'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.7dev',
+        # 'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.7dev',
         'https://bitbucket.org/thomaswaldmann/whoosh/get/2.4x.tar.gz#egg=Whoosh-2.4.99dev',
         # fixed flask-themes, 0.1.3 does not work for flask 0.8.x, thus we use a faked 0.1.3.1:
         'https://bitbucket.org/thomaswaldmann/flask-themes/get/24dcc703953f.tar.gz#egg=Flask-Themes-0.1.3.1',
--- a/wikiconfig.py	Sun Feb 17 18:29:23 2013 +0100
+++ b/wikiconfig.py	Mon Feb 18 00:46:53 2013 +0100
@@ -31,18 +31,18 @@
     # This provides a simple default setup for your backend configuration.
     # 'stores:fs:...' indicates that you want to use the filesystem backend.
     # Alternatively you can set up the mapping yourself (see HelpOnStorageConfiguration).
-    namespace_mapping, backend_mapping, acl_mapping = \
-        create_simple_mapping(uri='stores:fs:{0}/%(backend)s/%(kind)s'.format(data_dir),
-                              # XXX we use rather relaxed ACLs for the development wiki:
-                              content_acl=dict(before=u'',
-                                               default=u'All:read,write,create,destroy,admin',
-                                               after=u'',
-                                               hierarchic=False, ),
-                              user_profile_acl=dict(before=u'',
-                                                    default=u'All:read,write,create,destroy,admin',
-                                                    after=u'',
-                                                    hierarchic=False, ),
-                             )
+    namespace_mapping, backend_mapping, acl_mapping = create_simple_mapping(
+        uri='stores:fs:{0}/%(backend)s/%(kind)s'.format(data_dir),
+        # XXX we use rather relaxed ACLs for the development wiki:
+        content_acl=dict(before=u'',
+                         default=u'All:read,write,create,destroy,admin',
+                         after=u'',
+                         hierarchic=False, ),
+        user_profile_acl=dict(before=u'',
+                              default=u'All:read,write,create,destroy,admin',
+                              after=u'',
+                              hierarchic=False, ),
+    )
 
     #item_root = u'Home' # front page
 
@@ -63,12 +63,13 @@
     # see https://bitbucket.org/thomaswaldmann/xstatic for infos about xstatic:
     from xstatic.main import XStatic
     # names below must be package names
-    mod_names = ['jquery', 'jquery_file_upload',
-                 'json_js',
-                 'ckeditor',
-                 'svgweb',
-                 'svgedit_moin', 'twikidraw_moin', 'anywikidraw',
-                ]
+    mod_names = [
+        'jquery', 'jquery_file_upload',
+        'json_js',
+        'ckeditor',
+        'svgweb',
+        'svgedit_moin', 'twikidraw_moin', 'anywikidraw',
+    ]
     pkg = __import__('xstatic.pkg', fromlist=mod_names)
     for mod_name in mod_names:
         mod = getattr(pkg, mod_name)