Exemple #1
0
 /**
  * Get body of post.
  * Automatically applies filters.
  * @param bool|false $skipFilter Should the post skip the filters?
  * @return string Post content
  */
 public function getBody($skipFilter = false)
 {
     $content = $this->body;
     if (!$skipFilter) {
         // Run post through filters
         $content = PostProcessor::postProcess($content);
     }
     return $content;
 }
 /**
  * Parse markdown to HTML, similar to postParse, except online inline elements are accepted. This is good for
  * one-line descriptions and such, but bad for bodies of text, i.e. posts.
  * @param Request $request
  * @return string
  */
 public function postInlineParse(Request $request)
 {
     $markdown = PostProcessor::postProcess($request->input('markdown'));
     return $this->parser->parseParagraph($markdown);
 }