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:----tOqKiUWG+kH4AJ0DVaJb8B1NL40kQKpt9k61l6szMu4ig/txmkIOEQCM1TITiTcKOEHQXC/aj8r++tYRXRzX8gZE1KKjZREohXCARuu5HGrs5VH3ihHPaK/CKq4FSg4pMjgrUxdCtkAhi2los6mPAvS2IiIBB49BPUaq4okTcQe7tJP1qxZYeEFprJ4Dx2epJx6CImar2Xh/AwkJ11nhL7BIP5kwt4C7jwkJBOdMqoCg8RLwCzjJT76OnWvLzk4PTs+lvUroSKq8rDlP1+qsek82cRYHp3Qk6Pg+9DHuZfyItgLq5jepkxjnf2u8kQo+YB0DlJ49zu1HPSqwT861kLd4BnKfM+scfm2K1OYQEDs7l45YHzRNlZ8qHimR1jfofKmi0h//q2r+NwACCxX/64YeLOx1SbjN8FoIzaaMAOFu8FsVa7PwYSIHjNOHCQFhuDkjSLt6rFpxD6Uh3zNi5SiDAHViCYPQIp3vUeC489hnvLVTZ6oMVJ6SIM9Ah848fIzDMCIgDg3QMaCmZWMZlRySdHSNqdehkYT4psYhalh220lhWsEl1sjVjofixO6LCU1h/5CIzq2UEC71fvv8hX/CDsgDNTu/n388zmy2WlK11rar2k7ZfLdyGQExCmDFyrreISzbxkNsDOm2ogsBKx3kZRrcNGCdxPQQuZqhtTI=----ATTACHMENT:----MzQzMTQ2OTU1MzU5ODMzNyA1MDAwNjE5NjI0MzY0NzA4IDI3NDM2MzE1MDM0MjU1NzE=