Description

The macro dialog in the gui editor (generated by fckdialog action) is broken:

Example

see http://test.wikiwikiweb.de/?action=fckdialog&dialog=macro

Component selection

Workaround

apply the following patch:

   1 --- moin-1.6-260907-unpatched/lib/python2.5/site-packages/MoinMoin/action/fckdialog.py	2007-09-28 21:11:07.000000000 +0200
   2 +++ moin-1.6-260907/lib/python2.5/site-packages/MoinMoin/action/fckdialog.py	2007-09-28 22:04:40.000000000 +0200
   3 @@ -119,7 +119,7 @@
   4              helptext = ""
   5          helptexts.append(
   6              '''<div id="%s" style="DISPLAY: none">
   7 -               <b><<%s>></b>
   8 +               <b>&lt;&lt;%s&gt;&gt;</b>
   9                 <br/>
  10                 <textarea style="color:#000000" cols="37" rows="10" disabled="disabled">%s</textarea>
  11                 </div>'''
  12 @@ -151,10 +151,11 @@
  13          r"\|\|(<.*?>)?\{\{\{\[\[" +
  14          r"(?P<prototype>(?P<macro>\w*).*)" +
  15          r"\]\]\}\}\}\s*\|\|" +
  16 -        r"\s*(?P<help>.*?)\s*\|\|\s*(?P<example>.*?)\s*\|\|$", re.U + re.M)
  17 +        r"[^|]*\|\|[^|]*\|\|<[^>]*>" +
  18 +        r"\s*(?P<help>.*?)\s*\|\|\s*(?P<example>.*?)\s*(<<[^>]*>>)*\s*\|\|$", re.U + re.M)
  19      help = {}
  20      for match in macro_re.finditer(content):
  21 -        help[match.group('macro')] = match
  22 +        help[match.group('macro')] = match        
  23      return help
  24  
  25  ##############################################################################

repair_fckeditor_macro_dialog.diff

Discussion

note to developers: if, at a later stage, HelpOnMacros is changed to reflect the new macro syntax, it will be necessary to change the regex accordingly.

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.6devGuiMacroDialogBroken (last edited 2008-01-21 23:41:03 by ThomasWaldmann)