예제 #1
0
    /**
     * @expectedException Kisphp\Exceptions\CodeTemplateNameNotProvided
     */
    public function testMissingCodeTemplateName()
    {
        $md = \Kisphp\MarkdownFactory::createMarkdown();
        $content = <<<EOF
:::
no template name
:::

hello world

EOF;
        $md->parse($content);
    }
예제 #2
0
    /**
     * @expectedException \Kisphp\Exceptions\DataObjectBlockAlreadyExists
     */
    public function test_DoubleAddTemplateBlock()
    {
        $text = <<<MARKDOWN
:::code-1
this is my content
:::

:::code-1
this is my content
:::

MARKDOWN;
        $md = MarkdownFactory::createMarkdown();
        $md->parse($text);
    }
예제 #3
0
 public function get_html_formatted_content()
 {
     /* Make use of the markdown parser dependency to parse markdown syntax. */
     $factory = MarkdownFactory::createMarkdown();
     return $factory->parse($this->content);
 }