find('h3'); foreach ($versionHeadings as $heading) { $headingText = $heading->plaintext; // Extract version number using regex (e.g., "4.1.5" from "Version 4.1.5") if (preg_match('/Version\s+(\d+\.\d+(?:\.\d+)?)/i', $headingText, $matches)) { $versionNumber = $matches[1]; $item = []; $item['title'] = 'Evercade Update v' . $versionNumber; $item['uri'] = self::URI . '/support-vs/vs-patch-notes/'; $item['uid'] = 'evercade-patch-' . $versionNumber; $item['author'] = 'Blaze'; // Collect content between this H3 and the next H3 $content = $this->extractVersionContent($heading); $item['content'] = $content; // No timestamp available on page - RSS-Bridge will use current time $this->items[] = $item; } } } private function extractVersionContent($heading): string { $content = ''; $currentElement = $heading->next_sibling(); // Collect all content until next H3 or end while ($currentElement && $currentElement->tag !== 'h3') { // Get the outer HTML of the element to preserve formatting if (isset($currentElement->outertext)) { $content .= $currentElement->outertext; } $currentElement = $currentElement->next_sibling(); } return $content; } }