Attachment 'autotoc.patch'

Download

   1 --- ./moin-1.5.7/MoinMoin/Page.py-orig	2006-11-04 00:14:37.000000000 +1300
   2 +++ Page.py	2007-05-02 12:02:24.000000000 +1200
   3 @@ -1249,6 +1249,16 @@
   4          elif not request.user.may.read(self.page_name):
   5              request.write("<strong>%s</strong><br>" % _("You are not allowed to view this page."))
   6          else:
   7 +            # if the config file has the "auto_toc" setting, insert a table
   8 +            # of contents if the page has any headings
   9 +            want_toc = False
  10 +            try:
  11 +                want_toc = self.cfg.auto_toc
  12 +            except:
  13 +                pass
  14 +            if want_toc and pi_format == 'wiki' and not send_missing_page and (body.find("\n= ") >= 0 or body.find("\n== ") >= 0):
  15 +                body = "[[TableOfContents(3)]]\n" + body
  16 +
  17              # parse the text and send the page content
  18              self.send_page_content(request, Parser, body,
  19                                     format_args=pi_formatargs,

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] (2008-03-26 08:05:44, 0.8 KB) [[attachment:autotoc-1.6.1.patch]]
  • [get | view] (2007-05-02 00:23:28, 0.9 KB) [[attachment:autotoc.patch]]
 All files | Selected Files: delete move to page copy to page

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