Attachment 'wikicws.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 
   3 import re
   4 from MoinMoin.parser import wiki
   5 
   6 def repl(matchobj):
   7     return matchobj.group(1)+"[[BR]]\n"+matchobj.group(2)
   8 
   9 class Parser(wiki.Parser):
  10     """
  11     We do almost the same, just not drop single newlines
  12     """
  13     nld = re.compile(r"([\w\d])\r?\n([\w\d])")
  14     def format(self, formatter):
  15         """
  16         Format
  17         """
  18         #self.nld.finditer(self.raw)
  19         self.raw = self.nld.sub(repl,self.raw)
  20         #print self.raw;
  21         wiki.Parser.format(self, formatter)

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] (2007-03-07 20:42:29, 0.5 KB) [[attachment:wikicws.py]]
 All files | Selected Files: delete move to page copy to page

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