mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-08 03:52:12 +02:00
code styling for the active node
This commit is contained in:
parent
caf91877c7
commit
6aaac9200d
25
h-m-m
25
h-m-m
|
@ -2193,11 +2193,17 @@ function display(&$mm, $force_center = false)
|
||||||
.reset_color
|
.reset_color
|
||||||
.mb_substr($line, $x2)
|
.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
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
||||||
// this is here, because it doesn't need coordinates.
|
// styling the search results
|
||||||
// only inverting instead of giving another color,
|
|
||||||
// because, otherwise, it would conflict with the active
|
|
||||||
// node's highlight and it's a little complicated to fix.
|
|
||||||
|
|
||||||
if ($mm['query'] ?? '' != '')
|
if ($mm['query'] ?? '' != '')
|
||||||
$line =
|
$line =
|
||||||
|
@ -2236,17 +2242,6 @@ function display(&$mm, $force_center = false)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
// styling the codes
|
|
||||||
|
|
||||||
$line =
|
|
||||||
mb_ereg_replace
|
|
||||||
(
|
|
||||||
'\b(.\d)\. '
|
|
||||||
,dim_on.'\\1. '.dim_off
|
|
||||||
,$line
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
// styling "???"
|
// styling "???"
|
||||||
|
|
||||||
$line =
|
$line =
|
||||||
|
|
Loading…
Reference in a new issue