(self, changelog)
return new_changelog
Format the changelog correctly and convert it to a list of strings
Format the changelog correctly and convert it to a list of strings
Format the changelog correctly and convert it to a list of strings
def _format_changelog(self, changelog):
        """Format the changelog correctly and convert it to a list of strings
        """
        if not changelog:
            return changelog
        new_changelog = []
        for line in changelog.strip().split('\n'):
            line = line.strip()
            if line[0] == '*':
                new_changelog.extend(['', line])
            elif line[0] == '-':
                new_changelog.append(line)
            else:
                new_changelog.append('  ' + line)

        # strip trailing newline inserted by first changelog entry
        if not new_changelog[0]:
            del new_changelog[0]

        return new_changelog
def _format_changelog ( self , changelog ) : if not changelog : return changelog new_changelog = [ ] for line in changelog . strip ( ) . split ( '\n' ) : line = line . strip ( ) if line [ 0 ] == '*' : new_changelog . extend ( [ '' , line ] ) elif line [ 0 ] == '-' : new_changelog . append ( line ) else : new_changelog . append ( '  ' + line ) # strip trailing newline inserted by first changelog entry if not new_changelog [ 0 ] : del new_changelog [ 0 ] return new_changelog