Mercurial > moin > 1.9
changeset 2726:6cb75379c073
change ["free link"] to [[free link]] in all built-in markup
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sun, 12 Aug 2007 23:58:58 +0200 |
parents | 388204baf00f |
children | cc9590a900c2 |
files | MoinMoin/_tests/test_PageEditor.py MoinMoin/config/multiconfig.py MoinMoin/parser/_tests/test_text_moin_wiki.py MoinMoin/script/migration/_conv160_wiki.py MoinMoin/user.py MoinMoin/wikiutil.py |
diffstat | 6 files changed, 18 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/_tests/test_PageEditor.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/_tests/test_PageEditor.py Sun Aug 12 23:58:58 2007 +0200 @@ -75,7 +75,7 @@ """ PageEditor: expand @USERNAME@ extended name - enabled """ try: config = self.TestConfig() - self.assertEqual(self.expand(), u'["%s"]' % self.name) + self.assertEqual(self.expand(), u'[[%s]]' % self.name) finally: del config
--- a/MoinMoin/config/multiconfig.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/config/multiconfig.py Sun Aug 12 23:58:58 2007 +0200 @@ -346,7 +346,7 @@ mail_import_subpage_template = u"$from-$date-$subject" # used for mail import mail_import_pagename_search = ['subject', 'to', ] # where to look for target pagename (and in which order) mail_import_pagename_envelope = u"%s" # use u"+ %s/" to add "+ " and "/" automatically - mail_import_pagename_regex = r'\["([^"]*)"\]' # how to find/extract the pagename from the subject + mail_import_pagename_regex = r'\[\[([^\]]*)\]\]' # how to find/extract the pagename from the subject mail_import_wiki_addrs = [] # the e-mail addresses for e-mails that should go into the wiki mail_import_secret = ""
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py Sun Aug 12 23:58:58 2007 +0200 @@ -302,7 +302,7 @@ def testEscapeInGetTextFormatedLink(self): """ parser.wiki: escape html markup in getText formatted call with link """ - test = self.request.getText('["<escape-me>"]', formatted=1) + test = self.request.getText('[[<escape-me>]]', formatted=1) self._test(test) def testEscapeInGetTextUnFormatted(self): @@ -533,14 +533,14 @@ needle = re.compile(text % r'(.+)') _tests = ( # test, expected - ('["something"]', '<a class="nonexistent" href="./something">something</a>'), + ('[[something]]', '<a class="nonexistent" href="./something">something</a>'), ("['something']", "['something']"), - ('MoinMoin:"something"', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">something</a>'), - ('MoinMoin:"with space"', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20space" title="MoinMoin">with space</a>'), - ('RFC:"1 2 3"', '<a class="interwiki" href="http://www.ietf.org/rfc/rfc1%202%203" title="RFC">1 2 3</a>'), - ("RFC:'something else'", "RFC:'something else'"), - ('["with "" quote"]', '<a class="nonexistent" href="./with%20%22%20quote">with " quote</a>'), - ('MoinMoin:"with "" quote"', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20%22%20quote" title="MoinMoin">with " quote</a>'), + ('MoinMoin:something', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/something" title="MoinMoin">something</a>'), + ('[[MoinMoin:with space]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20space" title="MoinMoin">with space</a>'), + ('[[RFC:1 2 3]]', '<a class="interwiki" href="http://www.ietf.org/rfc/rfc1%202%203" title="RFC">1 2 3</a>'), + ("[[RFC:something else]]", "RFC:'something else'"), + ('[[with " quote]]', '<a class="nonexistent" href="./with%20%22%20quote">with " quote</a>'), + ('[[MoinMoin:with " quote]]', '<a class="interwiki" href="http://moinmoin.wikiwikiweb.de/with%20%22%20quote" title="MoinMoin">with " quote</a>'), ) def testTextFormating(self):
--- a/MoinMoin/script/migration/_conv160_wiki.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/script/migration/_conv160_wiki.py Sun Aug 12 23:58:58 2007 +0200 @@ -9,13 +9,13 @@ Markup transformations needed: ------------------------------------------------------- - ["some_page"] -> ["some page"] # renamed - [:some_page:some text] -> ["some page" some text] # NEW: free link with link text - [:page:text] -> ["page" text] # NEW: free link with link text + ["some_page"] -> [[some page]] # renamed + [:some_page:some text] -> [[some page|some text]] # NEW: free link with link text + [:page:text] -> [[page|text]] # NEW: free link with link text (with a page not being renamed) - attachment:with%20blank.txt -> attachment:"with blank.txt" - attachment:some_page/with%20blank.txt -> attachment:"some page/with blank.txt" + attachment:with%20blank.txt -> [[attachment:with blank.txt]] + attachment:some_page/with%20blank.txt -> [[attachment:some page/with blank.txt]] The attachment processing should also urllib.unquote the filename (or at least replace %20 by space) and put it into "quotes" if it contains spaces.
--- a/MoinMoin/user.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/user.py Sun Aug 12 23:58:58 2007 +0200 @@ -987,9 +987,9 @@ if wikiutil.isStrictWikiname(self.name): markup = pagename else: - markup = '["%s"]' % pagename + markup = '[[%s]]' % pagename else: - markup = '%s:%s' % (wikiname, pagename) # TODO: support spaces in pagename + markup = '[[%s:%s]]' % (wikiname, pagename) return markup def signature(self):
--- a/MoinMoin/wikiutil.py Sun Aug 12 23:42:33 2007 +0200 +++ b/MoinMoin/wikiutil.py Sun Aug 12 23:58:58 2007 +0200 @@ -851,7 +851,7 @@ if re.match(Parser.word_rule + "$", pagename): return pagename else: - return u'["%s"]' % pagename # XXX use quoteName(pagename) later + return u'[[%s]]' % pagename # XXX use quoteName(pagename) later ############################################################################# ### mimetype support