mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Require Inlines to provide a best plaintext rendering
This allows markdown to be parsed "inside" the alt attribute of an image, and then the best plaintext can be used as the rest. This improves CommonMark compliance.
This commit is contained in:
@@ -72,4 +72,12 @@ final class PlainText implements Inline
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Text
|
||||
*/
|
||||
public function bestPlaintext()
|
||||
{
|
||||
return new Text($this->text);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user