Closes #130 - Incident texts now support Markdown

This commit is contained in:
James Brooks
2014-12-30 10:33:06 +00:00
parent 695da2dc85
commit 8e05007a5c
5 changed files with 110 additions and 11 deletions
+11
View File
@@ -53,6 +53,17 @@ class Incident extends Eloquent implements \Dingo\Api\Transformer\TransformableI
}
}
/**
* Returns a Markdown formatted version of the status.
* @return string
*/
public function getFormattedMessageAttribute()
{
$parseDown = new ParsedownExtra();
return $parseDown->text($this->message);
}
/**
* Get the transformer instance.
* @return CachetHQ\Cachet\Transformers\IncidentTransformer