cache = $cache; $this->initParsedown(); } protected function initParsedown() { $this->parsedown = new \Parsedown(); $this->parsedown->setSafeMode(true); } /** * Converts the given markdown text to HTML. * The result is cached. * @param string $markdown The markdown text that should be parsed to html. * @param bool $inline_mode Only allow inline markdown codes like (*bold* or **italic**), not something like tables * @return string The HTML version of the given text. * @throws \Psr\Cache\InvalidArgumentException */ public function parse(string $markdown, bool $inline_mode = false) : string { return sprintf( '