On Thu, Mar 7, 2019 at 12:59 PM Lassi Kortela <xxxxxx@lassi.io> wrote: > All I had to do to the HTML was to add "proc def" classes to some <dt> > tags. And to add </dt> closing tags for them - otherwise BeautifulSoup > would get confused. This could be fixed by using another tagsoup library > or manually cutting off all subtags after a <dt> or <dd>. In order to transform the HTML into a "proper" HTML with closed tags (and then XHTML), I just opened the HTML file in Firefox, opened the developer tools and went to the DOM tab, clicked on the `<html>` element and copy it into clipboard. Then I've just pasted it over the original HTML, and surprisingly all the "closing tag" magic happened, while still keeping the original source formatting. Ciprian.