Attachment 'patch-Include-quoted-page-names-and-commas.diff'

Download

   1 # HG changeset patch
   2 # User Paul Boddie <paul@boddie.org.uk>
   3 # Date 1298752104 -3600
   4 # Node ID 173c3623377ba8ef4d21edb4c1a7f331e75cdbc7
   5 # Parent  10dc0763b79b05e1a861e7aa303016f6b7ab2b55
   6 Permit page name quoting and commas in page names.
   7 
   8 diff -r 10dc0763b79b -r 173c3623377b MoinMoin/macro/Include.py
   9 --- a/MoinMoin/macro/Include.py	Sat Feb 05 21:45:52 2011 +0100
  10 +++ b/MoinMoin/macro/Include.py	Sat Feb 26 21:28:24 2011 +0100
  11 @@ -4,7 +4,7 @@
  12  
  13      This macro includes the formatted content of the given page(s). See
  14  
  15 -        http://purl.net/wiki/moinmaster/HelpOnMacros/Include
  16 +        http://moinmo.in/HelpOnMacros/Include
  17  
  18      for detailed docs.
  19  
  20 @@ -26,6 +26,7 @@
  21  _sysmsg = '<p><strong class="%s">%s</strong></p>'
  22  
  23  ## keep in sync with TableOfContents macro!
  24 +_arg_page = r'(?P<pquote>[\'"]?)(?P<name>.+?)(?P=pquote)'
  25  _arg_heading = r'(?P<heading>,)\s*(|(?P<hquote>[\'"])(?P<htext>.+?)(?P=hquote))'
  26  _arg_level = r',\s*(?P<level>\d*)'
  27  _arg_from = r'(,\s*from=(?P<fquote>[\'"])(?P<from>.+?)(?P=fquote))?'
  28 @@ -35,8 +36,8 @@
  29  _arg_skipitems = r'(,\s*skipitems=(?P<skipitems>\d+))?'
  30  _arg_titlesonly = r'(,\s*(?P<titlesonly>titlesonly))?'
  31  _arg_editlink = r'(,\s*(?P<editlink>editlink))?'
  32 -_args_re_pattern = r'^(?P<name>[^,]+)(%s(%s)?%s%s%s%s%s%s%s)?$' % (
  33 -    _arg_heading, _arg_level, _arg_from, _arg_to, _arg_sort, _arg_items,
  34 +_args_re_pattern = r'^%s(%s(%s)?%s%s%s%s%s%s%s)?$' % (
  35 +    _arg_page, _arg_heading, _arg_level, _arg_from, _arg_to, _arg_sort, _arg_items,
  36      _arg_skipitems, _arg_titlesonly, _arg_editlink)
  37  
  38  _title_re = r"^(?P<heading>\s*(?P<hmarker>=+)\s.*\s(?P=hmarker))$"

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-02-26 20:38:20, 1.6 KB) [[attachment:patch-Include-quoted-page-names-and-commas.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.