Line handler may prevent specified element nesting

Swap `under_scores` for `camelCasing`
This commit is contained in:
Aidan Woods 2016-10-08 17:54:04 +01:00 committed by GitHub
parent 543a6c4175
commit 3aef89b399
1 changed files with 8 additions and 8 deletions

View File

@ -987,7 +987,7 @@ class Parsedown
# ~ # ~
# #
public function line($text, $non_nestables=array()) public function line($text, $nonNestables=array())
{ {
$markup = ''; $markup = '';
@ -1005,7 +1005,7 @@ class Parsedown
{ {
# check to see if the current inline type is nestable in the current context # check to see if the current inline type is nestable in the current context
if ( ! empty($non_nestables) and in_array($inlineType, $non_nestables)) if ( ! empty($nonNestables) and in_array($inlineType, $nonNestables))
{ {
continue; continue;
} }
@ -1033,9 +1033,9 @@ class Parsedown
# cause the new element to 'inherit' our non nestables # cause the new element to 'inherit' our non nestables
foreach ($non_nestables as $non_nestable) foreach ($nonNestables as $non_nestable)
{ {
$Inline['element']['non_nestables'][] = $non_nestable; $Inline['element']['nonNestables'][] = $non_nestable;
} }
# the text that comes before the inline # the text that comes before the inline
@ -1197,7 +1197,7 @@ class Parsedown
$Element = array( $Element = array(
'name' => 'a', 'name' => 'a',
'handler' => 'line', 'handler' => 'line',
'non_nestables' => array('Url', 'Link'), 'nonNestables' => array('Url', 'Link'),
'text' => null, 'text' => null,
'attributes' => array( 'attributes' => array(
'href' => null, 'href' => null,
@ -1425,14 +1425,14 @@ class Parsedown
{ {
$markup .= '>'; $markup .= '>';
if (!isset($Element['non_nestables'])) if (!isset($Element['nonNestables']))
{ {
$Element['non_nestables'] = array(); $Element['nonNestables'] = array();
} }
if (isset($Element['handler'])) if (isset($Element['handler']))
{ {
$markup .= $this->{$Element['handler']}($Element['text'], $Element['non_nestables']); $markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
} }
else else
{ {