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

def calibre::ebooks::markdown::markdown::Markdown::_processQuote (   self,
  parent_elem,
  lines,
  inList 
) [private]

Given a list of document lines starting with a quote finds
   the end of the quote, unindents it and recursively
   processes the body of the quote and the remainder of the
   text file.

   @param parent_elem: DOM element to which the content will be added
   @param lines: a list of lines
   @param inList: a level
   @returns: None 

Definition at line 1539 of file markdown.py.

01539                                                        :
        """Given a list of document lines starting with a quote finds
           the end of the quote, unindents it and recursively
           processes the body of the quote and the remainder of the
           text file.

           @param parent_elem: DOM element to which the content will be added
           @param lines: a list of lines
           @param inList: a level
           @returns: None """

        dequoted = []
        i = 0
        blank_line = False # allow one blank line between paragraphs
        for line in lines:
            m = RE.regExp['quoted'].match(line)
            if m:
                dequoted.append(m.group(1))
                i += 1
                blank_line = False
            elif not blank_line and line.strip() != '':
                dequoted.append(line)
                i += 1
            elif not blank_line and line.strip() == '':
                dequoted.append(line)
                i += 1
                blank_line = True
            else:
                break

        blockquote = self.doc.createElement('blockquote')
        parent_elem.appendChild(blockquote)

        self._processSection(blockquote, dequoted, inList)
        self._processSection(parent_elem, lines[i:], inList)




    def _processCodeBlock(self, parent_elem, lines, inList):


Generated by  Doxygen 1.6.0   Back to index