From 7865c8d5d8ccfc812d5c8bef67f77dc568fe9f4b Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Tue, 25 Nov 2014 14:49:11 -0500 Subject: [PATCH] Fix typo in the spelling of Markdown --- core/controllers/CommunityController.php | 2 +- core/controllers/components/UtilityComponent.php | 8 ++++---- core/views/community/index.phtml | 2 +- core/views/community/view.phtml | 2 +- modules/landingpage/controllers/IndexCoreController.php | 2 +- .../readmes/controllers/components/GetReadmeComponent.php | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/controllers/CommunityController.php b/core/controllers/CommunityController.php index c0459877d..905c85206 100644 --- a/core/controllers/CommunityController.php +++ b/core/controllers/CommunityController.php @@ -402,7 +402,7 @@ public function viewAction() $this->view->title .= ' - '.$communityDao->getName(); $this->view->metaDescription = substr( - $this->Component->Utility->markDown($communityDao->getDescription()), + UtilityComponent::markdown($communityDao->getDescription()), 0, 160 ); diff --git a/core/controllers/components/UtilityComponent.php b/core/controllers/components/UtilityComponent.php index deb6f76a7..ce22db356 100644 --- a/core/controllers/components/UtilityComponent.php +++ b/core/controllers/components/UtilityComponent.php @@ -520,12 +520,12 @@ public static function filterHtmlTags($text) } /** - * Convert a body of text from markdown to html. + * Convert the given text from Markdown or Markdown Extra to HTML. * - * @param text The text to markdown - * @return The markdown rendered as HTML + * @param string $text Markdown or Markdown Extra text + * @return string HTML text */ - public static function markDown($text) + public static function markdown($text) { return Michelf\MarkdownExtra::defaultTransform($text); } diff --git a/core/views/community/index.phtml b/core/views/community/index.phtml index dd2ada67f..74e98fac1 100644 --- a/core/views/community/index.phtml +++ b/core/views/community/index.phtml @@ -49,7 +49,7 @@ foreach ($this->otherCSSs as $uris) {
getDescription(); - $description = $this->Utility->markDown($rawDescription); + $description = $this->Utility->markdown($rawDescription); $strippedDescription = strip_tags($description); if (!empty($rawDescription)) { ?> diff --git a/core/views/community/view.phtml b/core/views/community/view.phtml index ec5fcda1b..23242821c 100644 --- a/core/views/community/view.phtml +++ b/core/views/community/view.phtml @@ -42,7 +42,7 @@ foreach ($this->customCSSs as $Uris) { } } $rawDescription = $this->communityDao->getDescription(); -$description = $this->Utility->markDown($rawDescription); +$description = $this->Utility->markdown($rawDescription); $strippedDescription = strip_tags($description); ?> diff --git a/modules/landingpage/controllers/IndexCoreController.php b/modules/landingpage/controllers/IndexCoreController.php index 7a8aba0a9..2f692abde 100644 --- a/modules/landingpage/controllers/IndexCoreController.php +++ b/modules/landingpage/controllers/IndexCoreController.php @@ -37,7 +37,7 @@ public function indexAction() $textDaos = $this->Landingpage_Text->getAll(); if (isset($textDaos[0])) { $textDao = $textDaos[0]; - $this->view->landingText = $this->Component->Utility->markDown($textDao->getText()); + $this->view->landingText = UtilityComponent::markdown($textDao->getText()); } else { $this->callCoreAction(); } diff --git a/modules/readmes/controllers/components/GetReadmeComponent.php b/modules/readmes/controllers/components/GetReadmeComponent.php index a7b700ae4..c53a20b0c 100644 --- a/modules/readmes/controllers/components/GetReadmeComponent.php +++ b/modules/readmes/controllers/components/GetReadmeComponent.php @@ -45,8 +45,8 @@ public function fromFolder($folder) $bitstream = $bitstreams[0]; $path = $bitstream->getAssetstore()->getPath().'/'.$bitstream->getPath(); $contents = file_get_contents($path); - $utilityComponent = MidasLoader::loadComponent('Utility'); - $parsedContents = $utilityComponent->markDown($contents); + MidasLoader::loadComponent('Utility'); + $parsedContents = UtilityComponent::markdown($contents); return array('text' => $parsedContents); }