Aaron,
> The element "\ngit\n" has its next_element attribute set to None. It should
> be set to the <em> tag instead. I haven't figured out exactly where the root
> source of the problem is. The <em> tag is definitely there; it's just not
> linked up.
This sort of thing happens a lot with the html5lib treebuilder, which
a) moves the tree around a lot while constructing it, and b) has
historically done this using its own code, taken from html5lib,
instead of standard Beautiful Soup code.
Other bugs of this sort:
https://bugs.launchpad.net/beautifulsoup/+bug/1039527
https://bugs.launchpad.net/beautifulsoup/+bug/1019603
https://bugs.launchpad.net/beautifulsoup/+bug/943246
Do you want to take this? Otherwise I'll look at it. I think the key
is to follow "\ngit\n" and the following <em> tag from their creation.
At some point, the <em> tag is supposed to set
self.previous_element.next_element = self, and that doesn't happen.
I wouldn't be surprised if the same thing happened with the "\nand\n"
that separates the two <strong> tags. That would be the place where
the bug causes the specific problem that Andrew reported..
Leonard