class documentation

class SubstituteTextPattern(HtmlInlineProcessor): (source)

View In Hierarchy

Undocumented

Method __init__ Replaces matches with some text.
Method handleMatch Return a ElementTree element from the given match and the start and end index of the matched text.
Instance Variable md Undocumented
Instance Variable replace Undocumented

Inherited from HtmlInlineProcessor:

Method unescape Return unescaped text given text with an inline placeholder.

Inherited from InlineProcessor (via HtmlInlineProcessor):

Instance Variable compiled_re Undocumented
Instance Variable pattern Undocumented
Instance Variable safe_mode Undocumented

Inherited from Pattern (via HtmlInlineProcessor, InlineProcessor):

Method getCompiledRegExp Return a compiled regular expression.
Method type Return class name, to define pattern type
Constant ANCESTOR_EXCLUDES Undocumented
def __init__(self, pattern, replace, md): (source)

Replaces matches with some text.

def handleMatch(self, m, data): (source)

Return a ElementTree element from the given match and the start and end index of the matched text. If `start` and/or `end` are returned as `None`, it will be assumed that the processor did not find a valid region of text. Subclasses should override this method. Keyword arguments: * m: A re match object containing a match of the pattern. * data: The buffer current under analysis Returns: * el: The ElementTree element, text or None. * start: The start of the region that has been matched or None. * end: The end of the region that has been matched or None.

replace = (source)

Undocumented