From 1194223ddd86e632c0e126ce7704e8dcced40f56 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 7 Nov 2015 18:22:10 +1300 Subject: [PATCH] shunt shields (almost) to the top --- rebuild.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rebuild.php b/rebuild.php index 56518be..aa1bf22 100644 --- a/rebuild.php +++ b/rebuild.php @@ -208,14 +208,18 @@ class CProject { $this->shortdesc[0] = strtolower($this->shortdesc[0]); // cosmetic lowercase // Filter longdesc - $this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) { - return ( + $prefix_html = ''; + $this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) use (&$prefix_html) { + $prefix_html .= ( ''. (SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').' ' : ''). mkshield('written in', $matches[1], 'blue'). + '
'. '' ); + return ''; }, $this->longdesc); + $this->longdesc = $prefix_html.$this->longdesc; continue; }