Refactored handling of details element.
Refactored handling of details element.

mushroomgithub/HTMLBook,gitenberg-dev/HTMLBook,gitenberg-dev/HTMLBook,mushroomgithub/HTMLBook,wastemobile/HTMLBook,macmillanpublishers/HTMLBook,gitenberg-dev/HTMLBook,wastemobile/HTMLBook,macmillanpublishers/HTMLBook,macmillanpublishers/HTMLBook,oreillymedia/HTMLBook,mushroomgithub/HTMLBook,oreillymedia/HTMLBook,oreillymedia/HTMLBook