Logo Search packages:      
Sourcecode: calibre version File versions  Download package

def calibre::ebooks::markdown::markdown::LinePreprocessor::_isLine (   self,
  block 
) [private]

Determines if a block should be replaced with an <HR>

Definition at line 591 of file markdown.py.

00591                             :
        """Determines if a block should be replaced with an <HR>"""
        if block.startswith("    "): return 0  # a code block
        text = "".join([x for x in block if not x.isspace()])
        if len(text) <= 2:
            return 0
        for pattern in ['isline1', 'isline2', 'isline3']:
            m = RE.regExp[pattern].match(text)
            if (m and m.group(1)):
                return 1
        else:
            return 0

LINE_PREPROCESSOR = LinePreprocessor()


Generated by  Doxygen 1.6.0   Back to index