changeset 2789:637a6c5ff74e

rst parser: use <<...>> for macros, no inline: any more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 31 Aug 2007 13:23:08 +0200
parents e857c1c3eca1
children c66e6c0a40b3
files MoinMoin/parser/text_rst.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_rst.py	Fri Aug 31 12:57:40 2007 +0200
+++ b/MoinMoin/parser/text_rst.py	Fri Aug 31 13:23:08 2007 +0200
@@ -326,7 +326,7 @@
             link scheme is used for, so for now it is handled here.
 
             Also included here is a hack to allow MoinMoin macros. This routine
-            checks for a link which starts with "[[". This link is passed to the
+            checks for a link which starts with "<<". This link is passed to the
             MoinMoin formatter and the resulting markup is inserted into the
             document in the place of the original link reference.
         """
@@ -338,9 +338,8 @@
                 prefix, link = refuri.lstrip().split(':', 1)
 
             # First see if MoinMoin should handle completely. Exits through add_wiki_markup.
-            if ((refuri.startswith('[[') and refuri.endswith(']]')) or
-                    (prefix == 'drawing') or
-                    (prefix == 'inline')):
+            if ((refuri.startswith('<<') and refuri.endswith('>>')) or
+                    (prefix == 'drawing')):
                 self.process_wiki_text(refuri)
                 self.wiki_text = self.fixup_wiki_formatting(self.wiki_text)
                 self.add_wiki_markup()
@@ -584,7 +583,7 @@
     # Add additional macro directive.
     # This allows MoinMoin macros to be used either by using the directive
     # directly or by using the substitution syntax. Much cleaner than using the
-    # reference hack (`[[SomeMacro]]`_). This however simply adds a node to the
+    # 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,
@@ -592,10 +591,10 @@
         # content contains macro to be called
         if len(content):
             # Allow either with or without brackets
-            if content[0].startswith('[['):
+            if content[0].startswith('<<'):
                 macro = content[0]
             else:
-                macro = '[[%s]]' % content[0]
+                macro = '<<%s>>' % content[0]
             ref = reference(macro, refuri=macro)
             ref['name'] = macro
             return [ref]