You are here

public function ParsedMarkdown::matches in Markdown 3.0.x

Compares whether the provided markdown matches this object.

Parameters

string|\Drupal\markdown\ParsedMarkdownInterface $markdown: An external markdown source.

Return value

bool TRUE or FALSE

Overrides ParsedMarkdownInterface::matches

File

src/ParsedMarkdown.php, line 188

Class

ParsedMarkdown

Namespace

Drupal\markdown

Code

public function matches($markdown) {
  if ($markdown instanceof static) {
    return $markdown
      ->getMarkdown() === $this
      ->getMarkdown();
  }
  return static::normalizeMarkdown($markdown) === $this
    ->getMarkdown();
}