

def add_newline_to_li(self):
    for e in self.parser.getElementsByTag(self.top_node, tag='ul'):
        li_list = self.parser.getElementsByTag(e, tag='li')
        for li in li_list[:(- 1)]:
            li.text = (self.parser.getText(li) + '\\n')
            for c in self.parser.getChildren(li):
                self.parser.remove(c)

dataset/ETHPy150Open codelucas/newspaper/newspaper/outputformatters.py OutputFormatter.add_newline_to_li/original