mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Expand public API of Components
Ref: https://github.com/erusev/parsedown/issues/694
This commit is contained in:
@@ -69,6 +69,12 @@ final class Emphasis implements Inline
|
||||
return new self($matches[1], $emphasis, \strlen($matches[0]));
|
||||
}
|
||||
|
||||
/** @return string */
|
||||
public function text()
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Handler<Element>
|
||||
*/
|
||||
@@ -80,7 +86,7 @@ final class Emphasis implements Inline
|
||||
return new Element(
|
||||
$this->type,
|
||||
[],
|
||||
$State->applyTo(Parsedown::line($this->text, $State))
|
||||
$State->applyTo(Parsedown::line($this->text(), $State))
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -91,6 +97,6 @@ final class Emphasis implements Inline
|
||||
*/
|
||||
public function bestPlaintext()
|
||||
{
|
||||
return new Text($this->text);
|
||||
return new Text($this->text());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user