1
0
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:
Aidan Woods
2019-01-22 19:06:26 +00:00
parent 576a2c4519
commit 82c981657d
13 changed files with 117 additions and 1 deletions

View File

@@ -72,4 +72,12 @@ final class PlainText implements Inline
}
);
}
/**
* @return Text
*/
public function bestPlaintext()
{
return new Text($this->text);
}
}