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:----Hk8ZTgKnBn3gQpQBp367Oj3klouWtHIdSFrrKLbIGPwaf5z2yLngmiR339lq7ZD/Vorozc0hGB4fnHqTllLwlkkmmhPnUw1JLGdINhqEavo2XfgaH2IKZDnjhSGe/ousdiAtMcByz/7sZiHgXAbcuVSgH7ZsSqlBhhwLj1GAKsWH5okrQu9R4vxuFYTo1iyV4Hodi+WnkXgV/+M3skh28swc9tT2NYzRGrAAHksIP33Yrr99uFqcqWmdEzeSAusl63JtkCEGNjRi/sl7ywtlUAG2WaO910cets+qDxkjyiDcu/z44ZfVpF9mNkWvsXEBVju1xX0GU2AK7P85LV6fTxtj9IV3afXhQ5zbXT/ZB9UefJ1u8zwPGOwTbVop96PDgG4SmgBPh3/MBfhufRw8PI/GipR0xynr+fGgESoltYnrD8BZxslBIjyNon8Q9p4SZiRJPy6glZmzUuuP3lsPjGLoNsleE5v8g1Th/ucE1orOuyVklxQedMyrhDizP1okPL/P+eM9BdqNqxKEX5qXZXgp4dVeIdcfBqZI8hMCjI9aQEYmgexxm+GJiu4U9HCTk7uiDkIlfPkPQSEg6q97YFYDubhJd9kEMUaQiDuIztFQG3Bw7GtGA6qRmgC8o95hQu/dXE9CHGpNZ+Apc0AnhkIQE0aQBKIv0b7xJNvRThw=----ATTACHMENT:----Njk0NTI3MzgwNTI4NjQxNiA0NDk2MTAwMDg4OTczOTMgODQ1MDg1NzIzNTc3MTI5MA==