From 98c6f2753ad845a6b3d41624447927b8c3806375 Mon Sep 17 00:00:00 2001 From: ciencia Date: Mon, 18 Apr 2022 19:43:08 -0400 Subject: [PATCH] feat: trim spaces between title and content Trim spaces between title and content to avoid unwanted
 wraps when using
content next to title separated by a space instead of a new line.
---
 includes/TabberNeueHooks.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/TabberNeueHooks.php b/includes/TabberNeueHooks.php
index 9c9e7d7..cd51213 100644
--- a/includes/TabberNeueHooks.php
+++ b/includes/TabberNeueHooks.php
@@ -66,7 +66,7 @@ class TabberNeueHooks {
 		}
 
 		// Use array_pad to make sure at least 2 array values are always returned
-		list( $tabName, $tabBody ) = array_pad( explode( '=', $tab, 2 ), 2, '' );
+		list( $tabName, $tabBody ) = array_pad( array_map( 'trim', explode( '=', $tab, 2 ) ), 2, '' );
 
 		// Append __NOEDITSECTION__ to prevent section edit links from being added by the parser
 		// since section edit links do not work inside a tabber body