'Set comment_content to the new and changed non-empty lines.'

def set_content(self, new_content, existing_content=None):

    existing_content = (existing_content or u'')
    diff = ndiff(existing_content.splitlines(1), new_content.splitlines(1))
    lines = []
    for line in diff:
        if line.startswith('+    '):
            diff_content = line[2:].strip()
            if diff_content:
                lines.append(diff_content)
    self.parameters['comment_content'] = u'\n'.join(lines)
