mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Make use of line name instead of lineElements
This commit is contained in:
parent
bb8a16ad81
commit
c9388cb5c2
|
@ -76,7 +76,7 @@ final class Header implements Block
|
|||
return new Element(
|
||||
'h' . \strval($this->level),
|
||||
[],
|
||||
$State->applyTo($Parsedown->lineElements($this->text))
|
||||
$State->applyTo($Parsedown->line($this->text))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -70,7 +70,7 @@ final class Paragraph implements ContinuableBlock
|
|||
return new Element(
|
||||
'p',
|
||||
[],
|
||||
$State->applyTo($Parsedown->lineElements($this->text))
|
||||
$State->applyTo($Parsedown->line($this->text))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -66,7 +66,7 @@ final class SetextHeader implements Block
|
|||
return new Element(
|
||||
'h' . \strval($this->level),
|
||||
[],
|
||||
$State->applyTo($Parsedown->lineElements($this->text))
|
||||
$State->applyTo($Parsedown->line($this->text))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -181,7 +181,7 @@ final class Table implements ContinuableBlock
|
|||
return new Element(
|
||||
'th',
|
||||
isset($alignment) ? ['style' => "text-align: $alignment;"] : [],
|
||||
$State->applyTo($Parsedown->lineElements($cell))
|
||||
$State->applyTo($Parsedown->line($cell))
|
||||
);
|
||||
},
|
||||
$this->headerCells,
|
||||
|
@ -203,7 +203,7 @@ final class Table implements ContinuableBlock
|
|||
return new Element(
|
||||
'td',
|
||||
isset($alignment) ? ['style' => "text-align: $alignment;"] : [],
|
||||
$State->applyTo($Parsedown->lineElements($cell))
|
||||
$State->applyTo($Parsedown->line($cell))
|
||||
);
|
||||
},
|
||||
$cells,
|
||||
|
|
|
@ -80,7 +80,7 @@ final class Emphasis implements Inline
|
|||
return new Element(
|
||||
$this->type,
|
||||
[],
|
||||
$State->applyTo($Parsedown->lineElements($this->text))
|
||||
$State->applyTo($Parsedown->line($this->text))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -129,7 +129,7 @@ final class Link implements Inline
|
|||
return new Element(
|
||||
'a',
|
||||
$attributes,
|
||||
$State->applyTo($Parsedown->lineElements($this->label))
|
||||
$State->applyTo($Parsedown->line($this->label))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -59,7 +59,7 @@ final class Strikethrough implements Inline
|
|||
return new Element(
|
||||
'del',
|
||||
[],
|
||||
$State->applyTo($Parsedown->lineElements($this->text))
|
||||
$State->applyTo($Parsedown->line($this->text))
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -248,7 +248,7 @@ final class Parsedown
|
|||
* @param string $text
|
||||
* @return StateRenderable[]
|
||||
*/
|
||||
public function lineElements($text)
|
||||
public function line($text)
|
||||
{
|
||||
# standardize line breaks
|
||||
$text = \str_replace(["\r\n", "\r"], "\n", $text);
|
||||
|
|
Loading…
Reference in New Issue
Block a user