mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-16 05:05:00 +02:00
bullet character behaves like * when pasting
This commit is contained in:
parent
ab0b8cc343
commit
66f4162d65
12
h-m-m
12
h-m-m
|
@ -340,6 +340,11 @@ function list_to_map($lines, $root_id, $start_id)
|
||||||
foreach ($lines as $lid=>$line)
|
foreach ($lines as $lid=>$line)
|
||||||
{
|
{
|
||||||
$lines[$lid] =
|
$lines[$lid] =
|
||||||
|
mb_ereg_replace
|
||||||
|
(
|
||||||
|
"^( *)•"
|
||||||
|
,'\1*'
|
||||||
|
,
|
||||||
mb_ereg_replace
|
mb_ereg_replace
|
||||||
(
|
(
|
||||||
"[\000-\010\013-\037\177]|".BOM
|
"[\000-\010\013-\037\177]|".BOM
|
||||||
|
@ -351,6 +356,7 @@ function list_to_map($lines, $root_id, $start_id)
|
||||||
,$lines[$lid]
|
,$lines[$lid]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
$indentation = mb_strlen($lines[$lid]) - mb_strlen(ltrim($lines[$lid]));
|
$indentation = mb_strlen($lines[$lid]) - mb_strlen(ltrim($lines[$lid]));
|
||||||
|
@ -2388,7 +2394,8 @@ function append(&$mm)
|
||||||
|
|
||||||
function paste_sub_tree(&$mm, $as_sibling )
|
function paste_sub_tree(&$mm, $as_sibling )
|
||||||
{
|
{
|
||||||
if ($as_sibling && $mm['active_node']==$mm['root_id']) return;
|
if ($as_sibling && $mm['active_node']==$mm['root_id'])
|
||||||
|
return;
|
||||||
|
|
||||||
if ($as_sibling)
|
if ($as_sibling)
|
||||||
$parent_id = $mm['nodes'][ $mm['active_node'] ]['parent'];
|
$parent_id = $mm['nodes'][ $mm['active_node'] ]['parent'];
|
||||||
|
@ -2411,7 +2418,8 @@ function paste_sub_tree(&$mm, $as_sibling )
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
if ($st==[]) return;
|
if ($st==[])
|
||||||
|
return;
|
||||||
|
|
||||||
push_change($mm);
|
push_change($mm);
|
||||||
$mm['modified'] = true;
|
$mm['modified'] = true;
|
||||||
|
|
Loading…
Reference in a new issue