Attachment 'nocamelcase2.py'

Download

   1 ## NoCamelCase2 - Written by Vangelis Livadiotis - Adapted from "NoCamelCase by FlorianFesti"
   2 ## Tested with MoinMoin 1.7.2 
   3 ## By no means a perfect plugin (it expects the comment "# CamelCase wiki words" in tne text_moin_wiki.py file)
   4 ## - but it works!
   5 ## 04-11-08
   6 
   7 from MoinMoin.parser import text_moin_wiki as wiki
   8 import re
   9 
  10 class Parser(wiki.Parser):
  11 
  12     def __init__(self, raw, request, **kw):
  13         wiki.Parser.scan_rules = re.sub(r"\)\|\(\?P<word>.*(.|\n)*# CamelCase wiki words", "",self.scan_rules)
  14         self.word_rule = ''
  15         wiki.Parser.__init__(self, raw, request, **kw)
  16 
  17     def format(self, formatter, inhibit_p=False):
  18         self.scan_rules = re.sub(r"\)\|\(\?P<word>.*(.|\n)*# CamelCase wiki words", "",self.scan_rules)
  19         self.scan_re = re.compile(self.scan_rules, re.UNICODE|re.VERBOSE)
  20         self.request.write(wiki.Parser.format(self, formatter, inhibit_p=False))

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-11-04 15:34:13, 0.9 KB) [[attachment:nocamelcase2.py]]
 All files | Selected Files: delete move to page copy to page

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