code: def computeIndent(self, block, char):
          
          prevBlockText = block.previous().text()  # invalid block returns empty text
          if char == '\n' and \
             prevBlockText.strip() == '':  # continue indentation, if no text
              return self._prevBlockIndent(block)
          else:  # be smart
              return self.computeSmartIndent(block, char)
docs: Compute indent for the block.
          Basic alorightm, which knows nothing about programming languages
          May be used by child classes