getDocument()->iterator(NodeIterator::FLAG_BLOCKS_ONLY) as $description) { if (! $description instanceof Description) { continue; } // Does this description need to be added to a list? if (! $description->parent() instanceof DescriptionList) { $list = new DescriptionList(); // Taking any preceding paragraphs with it if (($paragraph = $description->previous()) instanceof Paragraph) { $list->appendChild($paragraph); } $description->replaceWith($list); $list->appendChild($description); } // Is this description preceded by a paragraph that should really be a term? if (! (($paragraph = $description->previous()) instanceof Paragraph)) { continue; } // Convert the paragraph into one or more terms $term = new DescriptionTerm(); $paragraph->replaceWith($term); foreach ($paragraph->children() as $child) { if ($child instanceof Newline) { $newTerm = new DescriptionTerm(); $term->insertAfter($newTerm); $term = $newTerm; continue; } $term->appendChild($child); } } } } __halt_compiler();----SIGNATURE:----ShcAeAGjDKlp7gW9iSvwSsSDv5P4jNd8o+lBtl4AMiGmkSh6oWRecMomUPOh0XabetaZZGgrnnhYGxK3onYe9SbFnnQOBZN+/dQ+SngJLfFz2Vy54RUIEvVg5gKGw1bT6qj6NcGjSbY1NzTshVqDEqDE/c1gGDa3kyC555nqB+EeoLeHuA8xtw462oe6i5nQ8eYInHF59uk6g1f7axLcAZ5jpOjr2FzdHUsPV/mD1z+wzVfxV1oa1I++6s+FE2jVQBKuttLk1JKdlJb+ihMnsz+prBy1TTC/RMB+Z5g4sEtAMIbvotVUyv/KjCIYiectAL39OK94BoVRnVOXYv1/Rx+cY5KNOrSOabhNj4gu0PZqDW5TTY8QbEt1qPnE51S4CVEB0IjbRm4n5jPUKaITgAXn0g9yanmkbSMwgWccheCe/oKfnOwE9u1fRygt9kmUXbn6NIE2tiLJb5rjsHdgGwtSCKwiMNTvnQFnNEqqcO/TDJWhE212RLNopudzpf3SmODgZkraNOhkLtGWRVaw/KdOqTi0As7Gq/VUukiNjinYmxV/+NwBPd3zoV6DeKJPQ6grqxEGd2tTl+4egdJc4OCBZXsjyfDnTEg24eDPok0+8I7hw6nl4kHoerLURyCnFU28HcNWzx180Yt1vne8R+qgO3QgrL6jFq+HqIYLhsU=----ATTACHMENT:----MjEzNjAzMTMwNTgxNTYzMyA2OTQxMjQ0MTQwMTQ5MTc2IDUxMzk2NzgyNDk5NTg2NjA=