src/services/WordsmithService.php
public function markdown($s, $flavor = 'gfm', $inlineOnly = false) : string
	{

		// If flavor is 'extra' we're looking for Parsedown

		if ($flavor == 'extra')
		{

			if ($inlineOnly) {
				return (new \ParsedownExtra())->line($s);
			} else {
				return (new \ParsedownExtra())->text($s);
			}

		}

		// Otherwise, use Craft's built-in Yii-powered parser

		$flavor = ($flavor == 'yii-extra' ? 'extra' : $flavor);

		if ($inlineOnly) {
			return Markdown::processParagraph($s, $flavor);
		} else {
			return Markdown::process($s, $flavor);
		}

	}
public function markdown($s, $flavor = 'gfm', $inlineOnly = false) : string
	{

		// If flavor is 'extra' we're looking for Parsedown

		if ($flavor == 'extra')
		{

			if ($inlineOnly) {
				return (new \ParsedownExtra())->line($s);
			} else {
				return (new \ParsedownExtra())->text($s);
			}

		}

		// Otherwise, use Craft's built-in Yii-powered parser

		$flavor = ($flavor == 'yii-extra' ? 'extra' : $flavor);

		if ($inlineOnly) {
			return Markdown::processParagraph($s, $flavor);
		} else {
			return Markdown::process($s, $flavor);
		}

	}
Parses text through Markdown.

@param $s
@param string $flavor
@param bool $inlineOnly
@return string