Back to index

moin  1.9.0~rc2
Public Member Functions | Private Attributes
MoinMoin.support.htmlmarkup.Deuglifier Class Reference

List of all members.

Public Member Functions

def __new__
def format
def replace

Private Attributes

 _compiled_rules

Detailed Description

Definition at line 160 of file htmlmarkup.py.


Member Function Documentation

Definition at line 162 of file htmlmarkup.py.

00162 
00163     def __new__(cls):
00164         self = object.__new__(cls)
00165         if not hasattr(cls, '_compiled_rules'):
00166             cls._compiled_rules = re.compile('(?:' + '|'.join(cls.rules()) + ')')
00167         self._compiled_rules = cls._compiled_rules
00168         return self
    
def MoinMoin.support.htmlmarkup.Deuglifier.format (   self,
  indata 
)

Definition at line 169 of file htmlmarkup.py.

00169 
00170     def format(self, indata):
00171         return re.sub(self._compiled_rules, self.replace, indata)

Here is the call graph for this function:

def MoinMoin.support.htmlmarkup.Deuglifier.replace (   self,
  fullmatch 
)

Definition at line 172 of file htmlmarkup.py.

00172 
00173     def replace(self, fullmatch):
00174         for mtype, match in fullmatch.groupdict().items():
00175             if match:
00176                 if mtype == 'font':
00177                     return '<span>'
00178                 elif mtype == 'endfont':
00179                     return '</span>'
00180                 return '<span class="code-%s">' % mtype
00181 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 166 of file htmlmarkup.py.


The documentation for this class was generated from the following file: