You are here

public static function FilterHtml::fromParser in Markdown 8.2

Create a new instance from a Markdown Parser instance.

Parameters

\Drupal\markdown\Plugin\Markdown\ParserInterface $parser: A Markdown Parser instance.

Return value

static

File

src/Util/FilterHtml.php, line 53

Class

FilterHtml
Extends FilterHtml to allow more more permissive global attributes.

Namespace

Drupal\markdown\Util

Code

public static function fromParser(ParserInterface $parser) {
  return static::create($parser
    ->getCustomAllowedHtml())
    ->setParser($parser);
}