mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-17 22:46:32 +02:00
Compare commits
2 commits
1266938001
...
96fc5f9759
Author | SHA1 | Date | |
---|---|---|---|
96fc5f9759 | |||
bc127bf619 |
29
h-m-m
29
h-m-m
|
@ -2528,7 +2528,7 @@ function load_empty_map(&$mm)
|
|||
]
|
||||
;
|
||||
|
||||
$title = basename( $mm['filename'] ?? 'root' );
|
||||
$title = basename( empty($mm['filename']) ? 'root' : $mm['filename'] );
|
||||
if (substr($title,-4)=='.hmm')
|
||||
$title = substr($title,0,-4);
|
||||
|
||||
|
@ -2914,20 +2914,21 @@ function display(&$mm, $force_center = false)
|
|||
;
|
||||
|
||||
// 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.
|
||||
// with "else", the downside is that other codes
|
||||
// with the same "y" will not be styled.
|
||||
// Without the "else", the downside is that the
|
||||
// rest of the line in the active node won't be bold.
|
||||
// between these two, I think the former is better.
|
||||
|
||||
$line =
|
||||
mb_ereg_replace
|
||||
(
|
||||
'\b(.?\d+)\. '
|
||||
,dim_on.'\\1. '.dim_off
|
||||
,$line
|
||||
)
|
||||
;
|
||||
else
|
||||
$line =
|
||||
mb_ereg_replace
|
||||
(
|
||||
'\b(.?\d+)\. '
|
||||
,dim_on.'\\1. '.dim_off
|
||||
,$line
|
||||
)
|
||||
;
|
||||
|
||||
// styling the search results
|
||||
|
||||
|
|
Loading…
Reference in a new issue