From 57d34239ee9ddb0bafe7b451edd766c2089fc9d7 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 28 May 2026 19:28:04 +0000
Subject: [PATCH] =gitblit switch
---
blocks/_setup.php | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/blocks/_setup.php b/blocks/_setup.php
index cf7eb9e..9d1efd3 100644
--- a/blocks/_setup.php
+++ b/blocks/_setup.php
@@ -78,4 +78,26 @@
AJV_URL.'/assets/img/'.$imgs[$rand]['img'].'.png',
$imgs[$rand]['alt'],
);
+}
+
+function altr_prerender_core_quote(array $block, ?string $content, ?WP_Block $parent):?string
+{
+ $innerHTML = $block['innerHTML'];
+ $handler = JVB()->blocks();
+ // Extract cite content first
+ $cite = $handler->extractElement($innerHTML, 'cite');
+ $citeHtml = ($cite === '') ? '' : '<cite>— '.$cite.'</cite>';
+
+ // Get the blockquote content
+ $content = $handler->innerBlocks($block);
+
+ // Remove the cite element from content if it exists
+ if ($cite !== '') {
+ $content = $handler->stripTagContents('cite', $content);
+ }
+
+ return '<blockquote'.$handler->getClassesAndStyles($block['attrs']??[]).'>
+ <div class="content">'.$content.'</div>'.
+ $citeHtml.
+ '</blockquote>';
}
\ No newline at end of file
--
Gitblit v1.10.0