From d53c923049f28897999e2d66ddba372967847ee3 Mon Sep 17 00:00:00 2001 From: nadrad Date: Sat, 7 Jan 2023 12:39:31 +0100 Subject: [PATCH] fix - dimming the numbers at the beginning It wasn't formatting them when they were at the same Y as the active node. Now they are, but in return, the rest of those titles are not bold when active. --- h-m-m | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/h-m-m b/h-m-m index e414eca..9e09f77 100755 --- a/h-m-m +++ b/h-m-m @@ -2648,15 +2648,22 @@ function display(&$mm, $force_center = false) .reset_color .mb_substr($line, $x2) ; - else // styling the codes when the node is not active - $line = - mb_ereg_replace - ( - '\b(.?\d+)\. ' - ,dim_on.'\\1. '.dim_off - ,$line - ) - ; + + // styling the codes when the node is not active + // it used to be the 'else' of the above condition + // because it resets the bold attribute of the active + // node. However, it think losing the bold attribute + // is better than leaving the numbers unformatted + // in the same line as the active node. + + $line = + mb_ereg_replace + ( + '\b(.?\d+)\. ' + ,dim_on.'\\1. '.dim_off + ,$line + ) + ; // styling the search results