1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

improve names of protected members

This commit is contained in:
Emanuil Rusev 2015-01-05 15:05:18 +02:00
parent 19bc6a7083
commit b1be886d65

View File

@ -80,7 +80,7 @@ class Parsedown
#
protected $BlockTypes = array(
'#' => array('Atx'),
'#' => array('Header'),
'*' => array('Rule', 'List'),
'+' => array('List'),
'-' => array('Setext', 'Table', 'Rule', 'List'),
@ -270,34 +270,6 @@ class Parsedown
return $markup;
}
#
# Atx
protected function blockAtx($Line)
{
if (isset($Line['text'][1]))
{
$level = 1;
while (isset($Line['text'][$level]) and $Line['text'][$level] === '#')
{
$level ++;
}
$text = trim($Line['text'], '# ');
$Block = array(
'element' => array(
'name' => 'h' . min(6, $level),
'text' => $text,
'handler' => 'line',
),
);
return $Block;
}
}
#
# Code
@ -476,6 +448,34 @@ class Parsedown
return $Block;
}
#
# Header
protected function blockHeader($Line)
{
if (isset($Line['text'][1]))
{
$level = 1;
while (isset($Line['text'][$level]) and $Line['text'][$level] === '#')
{
$level ++;
}
$text = trim($Line['text'], '# ');
$Block = array(
'element' => array(
'name' => 'h' . min(6, $level),
'text' => $text,
'handler' => 'line',
),
);
return $Block;
}
}
#
# List