Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.parser._ParserBase.FormattingRulePair Class Reference

List of all members.

Public Member Functions

def __init__
def getStartRe
def getText

Public Attributes

 name
 str_begin
 str_end
 end_re

Detailed Description

Definition at line 96 of file _ParserBase.py.


Constructor & Destructor Documentation

def MoinMoin.parser._ParserBase.FormattingRulePair.__init__ (   self,
  name,
  str_begin,
  str_end,
  icase = False 
)

Definition at line 98 of file _ParserBase.py.

00098 
00099     def __init__(self, name, str_begin, str_end, icase=False):
00100         self.name = name
00101         self.str_begin = str_begin
00102         self.str_end = str_end
00103         re_flags = re.M
00104         if icase:
00105             re_flags |= re.I
00106         self.end_re = re.compile(str_end, re_flags)


Member Function Documentation

Definition at line 107 of file _ParserBase.py.

00107 
00108     def getStartRe(self):
00109         return self.str_begin

def MoinMoin.parser._ParserBase.FormattingRulePair.getText (   self,
  parser,
  hit 
)

Definition at line 110 of file _ParserBase.py.

00110 
00111     def getText(self, parser, hit):
00112         match = self.end_re.search(parser.text, parser.lastpos)
00113         if not match:
00114             next_lastpos = parser.text_len
00115         else:
00116             next_lastpos = match.end() + (match.end() == parser.lastpos)
00117         r = parser.text[parser.lastpos:next_lastpos]
00118         parser.lastpos = next_lastpos
00119         return hit + r
00120 


Member Data Documentation

Definition at line 105 of file _ParserBase.py.

Definition at line 99 of file _ParserBase.py.

Definition at line 100 of file _ParserBase.py.

Definition at line 101 of file _ParserBase.py.


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